If $A$ and $B$ are $n\times n$ matrices, and $AB$ is invertible then $A$ and $B$ are invertible.
I started out by writing that since $AB$ is invertible, then for the equation $ABx=b$ has a unique solution for any $b$, $x=(AB)^{-1}b$. Then I don't know how to break up the composition of AB to prove they are each individually similar.
Remember that a square $A$ matrix is invertible if and only if $Ax=0$ iff $x=0$
Suppose that $AB$ is invertible and that $B$ isn't invertible, so then there is a $x\neq0$ such that $Bx=0$. Then $ABx=A(Bx)=A0=0$, with $x\neq0$, which is a contradiction since $AB$ is invertible. Hence $B$ is invertible.
Now suppose $A$ is not invertible, then there is $x\neq0$ such that $Ax=0$. Since $B$ is invertible, take $y=B^{-1}x$, where $y\neq0$ since $x\neq0$. Then $ABy=A(By)=Ax=0$, which is a contradiction. Hence $A$ is invertible.