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

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$
