Angle YPR & angle RP? (5y) are a linear pair, which means they are supplementary angles. Supplementary angles have a sum of 180.
140 + 5y = 180
5y = 40
y = 8
Plug 8 back in for y. --> 5×8 = 40.
Angle YPS = 40 because it is a vertical angle to the just found 40 degree angle.