Given the equation $A(qr-p)=B(pr+q)$, when can $A=pr+q$ and $B=qr-p$ be true? The following equations are known:
Given Equations
\begin{align}
A^2+B^2&=C^2\\
Ap+Bq&=Cr\\
p^2+q^2&=r^2+1\\
A&\neq B\\
Aq-Bp&=C
\end{align}
$A(qr-p)=B(pr+q)$ comes from the equations given above. 
For this, I tried constructing a proof involving the prime factorization of $A(qr-p)$ and $B(pr+q)$ (which are just equal) and showed that since $A$ is not equal to $B$, then $A$ is equal to $pr+q$ and vice versa. However, I realized that I can make a lot of counterexamples for this (like $6 \cdot 4=8 \cdot 3$).
I really appreciate any form of hints or help that you could give. Thank you very much in advance!
 A: Above equation shown below:
$\begin{align}
A^2+B^2&=C^2\\
Ap+Bq&=Cr\\
p^2+q^2&=r^2+1\\
A&\neq B\\
Bp-Aq&=C
\end{align}$
"OP" had made a typo in the last equality which needed  a sign change:
So, now the above simultaneous equations are satisfied by:
$(A,B,C)=(4,3,5)$ & $(p,q,r)=(7,4,8)$
A: Mr.Seiji Tomita has given parametric solution to the simultaneous equations shown below which was posted by "OP"
The link to his web site is article # 284 & his web address is given below:
www.maroon.dti.ne.jp
And select "Computational number Theory"
$\begin{align}
A^2+B^2&=C^2\\
Ap+Bq&=Cr\\
p^2+q^2&=r^2+1\\
A&\neq B\\
Bp-Aq&=C
\end{align}$
So, the answer is yes to the query by "OP" 
And $A=(pr-q)$  & $B=(qr+p)$
But "OP" equation has a typo & required a sign change
Parametric solution given by Seiji Tomita gives another numerical solution to the above system of equations:
$(A,B,C)=((2n),(2n^2+2n),(2n^2+2n+1))$   
$(p,q,r) =((2n),(2n^2-1),(2n^2))$
So, for $n=3$ we get:  $(A,B,C)=(7,24,25)$  & $(p,q,r)=(6,17,18)$
A: Since you are tagging your post with "diophantine equations",
it is to assume that we are dealing with integers.
We have that
$$
\left\{ \matrix{
  Ax = By \hfill \cr 
  \gcd (x,y) = 1 \hfill \cr}  \right.\quad  \Rightarrow \quad \left\{ \matrix{
  A = ny \hfill \cr 
  B = nx \hfill \cr}  \right.
$$
Then it is clear how to proceed if $gcd(x,y) \ne 1$.
