Find matrices $P$ and $Q$ to check if matrices $A$ and $B$ are equivalent( $ Q^{-1}AP = B$ )? $ \begin{align}&A=\begin{pmatrix}
        6 & -3 & -6 & -12 & 9 & 9 & 0 & 3 & -6 & 9 \\
        12 & 4 & 8 & -4 & 8 & -12 & 4 & 4 & 8 & -4\\
        \end{pmatrix} \\\\
    & B = \begin{pmatrix}
        4 & -4 & 0 & -8 & -12 & 8 & -4 & -8 & 4 & -12 \\
        -9 & -3 & -6 & 3 & -6 & 9 & -3 & -3 & -6 & 3\\
        \end{pmatrix} 
\end{align}$
I need to find out if $A$ and $B $ are equivalent or not. 
To do that I have rearranged the definition of matrix equivalence: 
\begin{align} Q^{-1}AP & = B \\\\  AP & = QB \end{align}
So now I have 
$
\begin{pmatrix}
        6 & -3 & -6 & -12 & 9 & 9 & 0 & 3 & -6 & 9 \\
        12 & 4 & 8 & -4 & 8 & -12 & 4 & 4 & 8 & -4\\
        \end{pmatrix} \cdot
\begin{pmatrix}
 x_{1,1} & \cdots & x_{1,2} \\
 \vdots  &        & \vdots   \\
 x_{10,1}& \cdots & x_{10,2}
\end{pmatrix} =
\begin{pmatrix}
 y_{1,1} & \cdots & y_{1,2} \\
 \vdots  &        & \vdots   \\
 y_{10,1}& \cdots & y_{10,2}
\end{pmatrix} \cdot
\begin{pmatrix}
        4 & -4 & 0 & -8 & -12 & 8 & -4 & -8 & 4 & -12 \\
        -9 & -3 & -6 & 3 & -6 & 9 & -3 & -3 & -6 & 3\\
        \end{pmatrix} 
$
Question: How can I solve that big equation system with two variables $x$ and $y$ and get the matrices $P$ and $Q$?
Is there an easier (and hopefully more safe) way to solve that task?

If you only want to know if $A$ and $B$ are equivalent or not, you only need to show whether they have the same rank. A short explanation of this is that applying invertible square matrix on the left is just applying multiple elementary row operations, and applying invertible square matrix on the right is just applying multiple elementary column operations.
For this case, since there are only two rows in the matrices, the fastest way is to look at their column spaces.
