This question has been answered before for the case where $A$ and $B$ are both square: $A^TA=B^TB$. Is $A=QB$ for some orthogonal $Q$?
I didn't really follow the algebraic explanation there but the geometric explanation in terms of hyperspheres is really nice.
Unfortunately, if $A$ is not square, then we can't use the hypersphere argument since $A$ and $B$ will map to spaces of different dimensionality. Furthermore, $P$ will not be orthogonal as it is in the above case.
So, let's suppose $A$ has dimension $k \times k$ and $B$ has dimension $d \times k$ with $k<d$. Is is still true that there exists a matrix $P$ such that $A=PB$? $P$ will need to have dimension $k \times d$.
Let $B\in\mathbb R^{d\times k}$, where $k<d$. Let $M$ be a subspace of $\mathbb R^d$ such that $\text{im}B\subset M\subset\mathbb R^d$ and $\dim M = k$. Then there is a unitary operator $W : M\to\mathbb R^k$. Extend $W$ by setting $Wx =0$ for $x\in M^\perp$. Then $W : \mathbb R^d\to\mathbb R^k$ such that $W^TWy = y$ for $y\in M$. *)
Consider $C = WB\in\mathbb R^{k\times k}$. Then $C^TC = B^TW^TWB = B^TB$ and therefore $WB = C = Q(C^TC)^{1/2} = Q(B^TB)^{1/2}$. Hence, $B = W^TQ(B^TB)^{1/2}$. Setting $V = W^TQ$, you have $B = V(B^TB)^{1/2}$ with an isometry $V\in\mathbb R^{d\times k}$ (i.e., $V^TV = I_k$). Hence $$ A = U(A^TA)^{1/2} = U(B^TB)^{1/2} = UV^TB. $$
*) To see this, let $y\in M$ and $x\in \mathbb R^d$, $x = u+v$ with $u\in M$ and $v\in M^\perp$. Then $$ (W^TWy,x) = (Wy,Wx) = (Wy,Wu) = (y,u) = (y,u+v) = (y,x). $$ Thus, $W^TWy = y$.