In Composition of Binary Forms and the Foundation of Mathematics, Harold M. Edwards says that Gauss [cf. Art 235/236 of Disquisitiones Arithmeticae] proved the following result.
Theorem. Let $f$ and $\phi$ be [integer] binary quadratic forms. If $f$ and $\phi$ can be composed, the ratio of their determinants must be a ratio of squares.
Let’s say I can factor a certain Diophantine equation as $$(x_1^2+ay_1^2)(x_2^2+by_2^2)=x_3^2+cy_3^2,$$ where $\gcd(a,b)=1$.
As I read it, Gauss’s theorem implies that each of $a$ and $b$ must be an integer square. Am I correct?
The post and the final comment of the OP on the post raises the issue of the historical and modern day definitions of determinant and discriminant.
These apply to quadratic forms given by
$$ax^2+2bxy+cy^2=\begin{pmatrix}x&y \\\end{pmatrix}\begin{pmatrix}a&b\\b&c\\\end{pmatrix}\begin{pmatrix}x\\y\\\end{pmatrix}.$$
In article $154$ Gauss defines the determinant of the quadratic form to be $b^2-ac.$
Nowadays the determinant of the matrix is defined to be $ac-b^2$.
While the discriminant of the quadratic is defined to be $4b^2-4ac$.