Show that there is no right triangle whose legs are rational numbers and whose hypotenuse is $\sqrt{2022}$. Show that there is no right triangle whose legs are rational numbers and whose hypotenuse is $\sqrt{2022}$.
My tries:

*

*I used Pythagoras' Theorem to get: $$\sqrt{2022}^2=a^2+b^2 \implies a^2+b^2 = 2022$$
where $a$ and $b$ are the legs of the triangle.
I don't know what to do next: Is there another formula I could use?
I know that $a+b>\sqrt{2022}$ but I don't think this is going to help us much.

hope one of you can help me! thank you!

Lettin $a=\frac{x}{k}$, $b=\frac{y}{k}$, where $x,y,k$ are positive integers and $\gcd(x,y,k)=1$, we get, as Henry told, $x^2+y^2=2022k^2$. From this equation, it is not difficult to see that $x$ and $y$ must be odd. See Adam's answer. If $x,y$ are odd then since square of an odd number modulo $8$ is $1$, we get the modular equation $6k^2\equiv2\pmod 8$ which has no integer solutions.
