Hey man, this is pretty straight forward, I'll try to lead you through.

first calculate the minimal angle at which inner reflection happens (for a meterial with the given refraction index).

Second, lets stick with an incident angle of alpha = 45°, since we know, that this is the angle, where inner reflection happens first at the surface PR. Calculate the angle after the surface PQ relative to the optical axis of PQ. Then transform this angle relative to the optical axis of Surface PR. This expression will contain the angle Theta. Now you can compare this expression with the above calculated angle, where inner reflection happens first. Thats it, let me know if you need further help

cheers