Show that scalene triangle $\triangle ABC$ is a right-triangle if $\sin(A)\cos(A)=\sin(B)\cos(B)$ As the title suggests, this is a college entrance exam practice problem from Japan, it is as follows:

Given a scalene triangle $\triangle ABC$, prove that it is a right triangle if $\sin(A)\cos(A)=\sin(B)\cos(B)$

I found this problem pretty interesting, and after some thinking, I found a way to solve it, and I'll show my attempt here. I want to know, are there any other/better ways to solve this? Or is there anything about my solution that can be improved? Please let me know!
Here's my attempt:
Some have that: $$\sin(A)\cos(A)=\sin(B)\cos(B)$$
From Law of Sines we know that:
$$\frac{a}{\sin(A)}=\frac{b}{\sin(B)}=\frac{c}{\sin(C)}=2R$$
And from Law of Cosines:
$$\cos(B)=\frac{a^2+c^2-b^2}{2ac}$$ $$\cos(A)=\frac{b^2+c^2-a^2}{2bc}$$
Therefore:
$$(\frac{a}{2R})(\frac{b^2+c^2-a^2}{2bc})=(\frac{b}{2R})(\frac{a^2+c^2-b^2}{2ac})$$
Dividing and multiplying by $a$ on the left side and by $b$ on the right side gives us:
$$\frac{(a^2)(b^2+c^2-a^2)}{4Rabc}=\frac{(b^2)(a^2+c^2-b^2)}{4Rabc}$$
$$a^2b^2+a^2c^2-a^4=a^2b^2+b^2c^2-b^4$$
$$(a^2-b^2)c^2-(a^2-b^2)(a^2+b^2)=0$$
$$(a+b)(a-b)(-a^2-b^2+c^2)=0$$
Now, obviously the case $a=-b$ cannot be true. We also know that $a=b$ does not work in this particular case since this triangle is scalene, therefore we're left with:
$$-a^2-b^2+c^2=0$$
$$a^2+b^2=c^2$$
And this proves that the triangle is right angled
 A: Your method is correct.
If you can use trigonometric identities, proceed as follows:
$2\sin(A)\cos(A)=2\sin(B)\cos(B)$
$\sin(2A)=\sin(2B)$
Thus $2A$ and $2B$ are either equal or supplementary, so correspondingly $A$ and $B$ are equal or complementary. But equality of angles implies the triangle is isosceles, a contradiction; so $A$ and $B$ must be complementary from which the third angle ($\angle C$) has to measure $180°-90°=90°$ and thus the triangle is right.
A: @OscarLanzi's reasoning is correct and easy. Alternatively you can do:
$$\sin A\cos A=\sin B\cos B$$
$$\sin2A=\sin2B$$
$$\sin2A-\sin2B=0$$
$$2\cos(\underbrace{A+B}_{\pi-C})\sin(A-B)=0$$
$$\cos C\sin(A-B)=0$$
Therfore the first case: $\cos C=0$ leads to the triangle being right angled at $C$, or the second case: $\sin(A-B)=0$ implies $\angle A=\angle B$ which can be neglected as the triangle is given to be scalene.
(In fact, this is the equational representation of @OscarLanzi's logic.)
A: Here's an identity-free approach:

Writing $D$ and $E$ for the feet of the altitudes from $A$ and $B$, we have
$\require{cancel}$
$$\color{blue}{|\triangle ABE|}+\color{red}{|\triangle CBE|} \;=\; |\triangle ABC| \;=\; \color{blue}{|\triangle BAD|}+\color{red}{|\triangle CAD|} \tag1$$
$$\cancel{\color{blue}{\tfrac12c^2\sin A\cos A}}+\color{red}{\tfrac12 a^2\sin C\cos C} \;=\; \cancel{\color{blue}{\tfrac12c^2\sin B\cos B}}+\color{red}{\tfrac12 b^2\sin C\cos C} \tag2 $$
$$\underbrace{(a^2-b^2)}_{\neq0\;\text{(scalene)}}\cdot\underbrace{\sin C}_{\neq0}\cdot\cos C \;=\; 0 \quad\to\quad \cos C = 0 \quad\to\quad C = 90^\circ\tag3$$
Done! $\square$
