If PS is an altitude, then you know two things. 1. S lies on the segment QR and 2. PS forms a right angle with QR.
Therefore PQS is a right triangle with a hypotenuse (PQ) of 13 and a long leg (PS) of 12. Either recognizing two numbers from the Pythagorean Triple 13-12-5, or using the Pythagorean Theorem, you can calculate the measure of QS, which is 5.
Knowing that QS = 5, we can determine that SR = QR - QS = 13 - 5 = 8.
Now consider the right triangle PSR with legs PS = 12 and SR = 8.