For the 2nd problem
from the 2 right triangles you are told exist, using the pythagorean theorem
$x^2 + h^2 = a^2$
$y^2 + h^2 = b^2$
now you are told that $h^2 = x y$
substituting this in we get
$x^2 + xy = a^2$
$y^2 + xy = b^2$
adding these two equations we get
$x^2 + y^2 + 2 x y = a^2 + b^2$
$(x+y)^2 = a^2 + b^2$
and looking at triangle ACB we see that $x+y$ is the hypotenuse of the triangle with legs $a$ and $b$ and as
$(x+y)^2 = a^2 + b^2$ ACB must be a right triangle.