Jacobian rules with canonical transformations 
If we consider a canonical transformation from $(q,p)$ to $(Q,P)$, it is stated in several sources that by Jacobian rules,
  $$ \frac{\partial(Q,P)}{\partial(q,p)} = \frac{\partial(Q,P)/\partial(q,P)}{\partial(q,p)/\partial(q,P)}. \tag{1}
$$

By taking books such as Riley's Mathematical Methods for physics and engineering, I could confirm that this is indeed true (section 6.4.4). However, I have tried this myself and it seems that I am missing something. For instance the left hand side of the above equation expands in:
$$ \frac{\partial(Q,P)}{\partial(q,p)}=\begin{vmatrix}
 \frac{\partial Q}{\partial q} & \frac{\partial Q}{\partial p}\\
 \frac{\partial P}{\partial q} & \frac{\partial P}{\partial p}\\
\end{vmatrix} =
\frac{\partial Q}{\partial q}\frac{\partial P}{\partial p} - \frac{\partial Q}{\partial p}\frac{\partial P}{\partial q}
$$
Now, the numerator of the right hand side is
$$ \frac{\partial(Q,P)}{\partial(q,P)}=\begin{vmatrix}
 \frac{\partial Q}{\partial q} & \frac{\partial Q}{\partial P}\\
 \frac{\partial P}{\partial q} & \frac{\partial P}{\partial P}\\
\end{vmatrix} =
\frac{\partial Q}{\partial q}\frac{\partial P}{\partial P} - \frac{\partial Q}{\partial P}\frac{\partial P}{\partial q}=\frac{\partial Q}{\partial q}
$$
Then, the denominator is
$$ \frac{\partial(q,p)}{\partial(q,P)}=\begin{vmatrix}
 \frac{\partial q}{\partial q} & \frac{\partial q}{\partial P}\\
 \frac{\partial p}{\partial q} & \frac{\partial p}{\partial P}\\
\end{vmatrix} =
\frac{\partial q}{\partial q}\frac{\partial p}{\partial P} - \frac{\partial q}{\partial P}\frac{\partial p}{\partial q}=\frac{\partial p}{\partial P}
$$
yielding the right hand side of the first equation above:
$$
\frac{\partial(Q,P)/\partial(q,P)}{\partial(q,p)/\partial(q,P)} = \frac{\partial Q}{\partial q}\frac{\partial P}{\partial p}
$$
which corresponds to the first term of the second equation above. This means that the second term of the second equation above has to be zero. However, I fail to see why this is true. Assuming that $Q=Q(p,q)$ and $P=P(p,q)$, that term should have a value. What am I missing?
 A: OP's eq. (1) is true for any invertible coordinate transformation -- they don't need to be canonical coordinates. The trick is to keep track of what is kept constant during the partial differentations. In 2D eq. (1) reads:
$$\begin{align} {\rm LHS}
~=~&\left(\frac{\partial Q}{\partial q}\right)_p \left(\frac{\partial P}{\partial p}\right)_q - \left(\frac{\partial P}{\partial q}\right)_p \left(\frac{\partial Q}{\partial p}\right)_q\cr
~=~& \left[\left(\frac{\partial q}{\partial q}\right)_p \left(\frac{\partial Q}{\partial q}\right)_P + \left(\frac{\partial P}{\partial q}\right)_p \left(\frac{\partial Q}{\partial P}\right)_q\right] \left(\frac{\partial P}{\partial p}\right)_q \cr
&- \left(\frac{\partial P}{\partial q}\right)_p \left[\left(\frac{\partial q}{\partial p}\right)_q \left(\frac{\partial Q}{\partial q}\right)_P +\left(\frac{\partial P}{\partial p}\right)_q \left(\frac{\partial Q}{\partial P}\right)_q \right]\cr
~=~& \left[\left(\frac{\partial Q}{\partial q}\right)_P + \left(\frac{\partial P}{\partial q}\right)_p \left(\frac{\partial Q}{\partial P}\right)_q\right] \left(\frac{\partial P}{\partial p}\right)_q 
- \left(\frac{\partial P}{\partial q}\right)_p \left(\frac{\partial P}{\partial p}\right)_q \left(\frac{\partial Q}{\partial P}\right)_q \cr
~=~& \left(\frac{\partial Q}{\partial q}\right)_P\left(\frac{\partial P}{\partial p}\right)_q
~=~\left(\frac{\partial Q}{\partial q}\right)_P / \left(\frac{\partial p}{\partial P}\right)_q
~=~{\rm RHS},\end{align}$$
where we used the multi-variable chain rule twice.
A: The expression $\frac{\partial(Q,P)/\partial(q,P)}{\partial(q,p)/\partial(q,P)}$ is ratio of Jacobians. 
Evaluate each expression independently by eliminating the repeated variables - then divide them. 
In your case, $\frac{\partial(Q,P)/\partial(q,P)}{\partial(q,p)/\partial(q,P)}=\frac{\partial Q/\partial q}{\partial p/\partial P}=J$.
The transformation is canonical since $\partial Q/\partial q=1$ and $\partial p/\partial P=1$ which implies $J=1$ where $J$ is the Jacobian.
