I have a right triangle, with two sides with lengths $x$ and $y$ respectively. Their lengths are randomly taken from two different pdfs. Simple diagram of triangle
The sides of the triangle have the following pdfs (can be any other pdf):
$f_{X}(x) = -\frac{6}{a^{3}}x^{2} + \frac{6}{a^{2}}x $
$f_{Y}(y) = \frac{1}{a} $
Where $a$ is a constant that defines the maxima of the range (give it any number that you want). How can I get the pdf of the hypotenuse $h$.
$h = \sqrt{x^2+y^2}$
$f_{H}(h) = \ ? $
You might be interested to read this section on Wikipedia. You can retrieve some of the formulas mentioned there without too much computation.
If $g$ is a borelian function,
$$\mathop{\mathsf{E}} g(h)=\mathop{\mathsf{E}} g\left(\sqrt{x^2+y^2}\right)=\int_0^a\int_0^a g\left(\sqrt{x^2+y^2}\right)f_X(x) f_Y(y) \mathop{dx} \mathop{dy}.$$
Now changing to polar coordinates:
$$\mathop{\mathsf{E}} g(h)=\int_0^a g(r) \left(\int_0^{2\pi}f_X(r\cos\varphi) f_Y(r\sin\varphi)\mathop{d\varphi} r\right)\mathop{dr}.$$
So by definition of the density function $f_H(h)=h\int_0^{2\pi}f_X(h\cos\varphi) f_Y(h\sin\varphi)\mathop{d\varphi}$. Computing this integral in your case is just a calculus exercise.