Look at the picture, when y= 1, s=3, that is, 3 = a+b.
When y=0, s=4, that is, 0 = 4a+b.
Simultaneous equations can get a=- 1 and b=4, so the original function is y=-s+4.
That is, y = 4-s.