Can someone please tell me if I managed to do this correctly?

"The length of one leg of a right triangle is 2 ft longer than the other leg. If the hypotenuse is 10 ft, find the perimeter of the triangle."

My answer was

P (perimeter) = 12+2y

If this is wrong someone please tell me. I don't understand how to do these types of problems at all.