Can a right triangle have odd-length legs and even-length hypotenuse?

Hint:

Suppose you have $A^2+B^2=C^2$ where $A=2a+1, B=2b+1, C=2c$

Substitute, expand and then take out terms with factors of $4$


Suppose that you are right and there is a possible right triangle such that $a=2k+1, b=2m+1$ and $c=2n$ {legs are odd while hypotenuse is even} and you have $a^2+b^2=c^2$.

Now on expanding (substituting for $a, b, c$) you will get that: $$(2k+1)^2+(2m+1)^2=(2n)^2$$ $$4(k^2+m^2+k+m)+2=4n^2$$ On dividing the equation by $2$, you will get $$2(k^2+m^2+k+m)+1=2n^2$$

Notice that term on left is odd while the term on right is even. A contradiction. So, you were wrong and therefore there does not exist such a right triangle