The fact that a good diagram will most of the time make the toughest problems instantly seem easier

Draw a Velocity time graph. For the first 10 s, there is a constant slope of gradient a1. For the next part, there is a line with gradient 0, for some unknown time t, and between t and (20-t) seconds later, there is a slope with a negative gradient, a2.

What you have is a trapezium. The properties of a VT graph is that the gradient gives the acceleration, and the area under the graph gives the displacement.

You got t = 45 s, meaning that on your graph, on the horizontal axis, you'll have (45+10) = 55 s elapsed since the start of the motion and t = 75 s for the whole trip.

Using the area, you can get a1 and a2 quickly.

The total area is 300 m, that is:

Area = 0.5 * v * (75 + 45)

You can get v. From there, work out a1 and a2 easily

And then, everything becomes easy.