Concept used — trigonometric ratios of an acute angle
In a right triangle, for an acute angle,
sin=hypotenuseopposite,cos=hypotenuseadjacent,tan=adjacentopposite
cosec=sin1,sec=cos1,cot=tan1=oppositeadjacent
The hypotenuse is the side facing the right angle. "Opposite" and "adjacent" depend on which acute angle we stand at, so name them afresh for each angle.
The missing sides come from Pythagoras theorem: in △PQR right-angled at Q, the hypotenuse is PR and
PR2=PQ2+QR2
Given: ∠Q=90∘, PQ=5 cm and PR+QR=25 cm.
Step 1 — Put the unknown sides in terms of one letter. Let QR=x cm. Then PR=(25−x) cm.
Step 2 — Apply Pythagoras theorem.
(25−x)2=52+x2
625−50x+x2=25+x2
625−25=50x⇒600=50x⇒x=12
So QR=12 cm and PR=25−12=13 cm.
Step 3 — Name the sides for angle P. Opposite P: QR=12 cm. Adjacent to P: PQ=5 cm. Hypotenuse: PR=13 cm.
sinP=PRQR=1312,cosP=PRPQ=135,tanP=PQQR=512
Answer: sinP=1312, cosP=135, tanP=512.

With QR = x, the hypotenuse is PR = 25 − x; Pythagoras gives x.
Note: check: 52+122=25+144=169=132 ✓ and PR+QR=13+12=25 ✓.