Answer
$P(x)=3x+\sqrt5x$
Work Step by Step
The perimeter is the sum of all the sides. Given is one of its legs which is $x$; the other leg which is twice as long as the other one, so $2x$; and the hypotenuse, which we'll call $y$.
The perimeter would then be: $P=x+2x+y$, but we want the equation in terms of $x$ only, so we can turn $y$ in terms of $x$ by using the Pythagoras's theorem since the triangle is a right triangle:
$y^2=x^2+(2x)^2$
$y^2=x^2+4x^2$
$y^2=5x^2$
$y=\sqrt{5x^2}$
$y=\sqrt5x$
Now, we can substitute this into the perimeter's equations and it will be in terms of $x$ only:
$P(x)=x+2x+(\sqrt5x)$
$P(x)=3x+\sqrt5x$