I'll tell you the method , tell me if you get the answer , it was pretty long so i left it but i'll tell you the logic.
Let the angle of incidence be

and angle of refraction in the first case be r1 and in the second case be r2.
Acc to the qn

= r
1+23 & ........(1)

+60 = r
2+23........(2)
By snells law
sin

/sinr
1=

........(3)
& sin(

+60)/sinr
2=

........(4)
Now see eqns 1,2,3 and 4 have 4 variables only which are r1,r2,

and

... it'll be long but i think you should get the answer by this.