The one that is closer to the source of the ray, of course! For, you see, a ray is not a line: a ray has a source from which it originates. Once a ray hits a surface it gets reflected - and the reflected ray may, in principle, hit the same or another surface at some other point.

I find that surprising: why, you just replace the coordinates x,y,z in the equation for the surface with terms expressed with t, i.e. x=5-t, y=-1+t and z=t, based on the equation of the ray, then solve for t.As far as I understand I should set the two equations equal to each other and try solve them for the unknown parameter t? I've tried this but I can't get anywhere.

In your example this gives the two solutions t1=2 and t2=4, if I am not mistaken (check it for yourself). Now plug these two values of t back into the equation of the ray and you have found the points of intersection.