The cyclist has a constant speed of 5m/s, so its distance is 5t, as you've said.

The motorist is trickier. Your formula only works when t ≥5. If t < 5, then the triangle in the speed-time graph has a variable size, so you can't represent it as a constant, as you have. Its size would be t x 4t /2 = 2t².

If you equate that with 5t then you get 5t = 2t².

5 =2t

t = 2.5

You can tell that that is right because it returned a value that was less than 5. If it gave a value more than 5, you'd have to use the formula that you made.