Here's my alternative substitution:
As follows:
This graph should help
The ground is at height y = 0, so set y to zero and solve the resulting equation for t using the quadratic formula. You will get two answers, but only the positive value is meaningful here.
The two expressions must be equal when x = 3, so:
3 + 2 = 2*3^2 + 3*3 + a
so
5 = 27 + a
I'll leave you to find a from this.
Subtract x from both sides and add 5 to both sides. What do you get?