Is the following claim true?

**Claim** Let $A, B\in C^{n\times n}$ with $rank(A)=rank(B)=r$. Then there exist nonsingular matrices $P_1, P_2, Q_1, Q_2$ such that

$$ Q_1AP_1=Q_2BP_2=\left(\begin{array}{cc}I_{r}&0\\\ 0&0 \end{array}\right)$$ and $$Q_1Q_2^{-1}=\left(\begin{array}{cc}X_1&0\\\ X_2&X_3 \end{array}\right), \qquad P_1^{-1}P_2=\left(\begin{array}{cc}Y_1&Y_2\\\ 0&Y_3 \end{array}\right),$$ where $X_1, Y_1 \in C^{r\times r}$.