I'm studying for the math section of the ACT and I can't remember how to solve this problem.

A right triangle has legs of length 25 sin theta feet and 25 cos theta feet for some angle theta that satisfies 0< theta< 90. What is the length, in feet, of the longest side of the triangle?

F. theta

G. 1

H. 5

J. 25

K. Cannot be determined from the given information

I know that the answer is J but I wasn't given an explanation. If someone could help me that would be great.