I can't figure out these 2 questions from the applications section.

P(x) = $\displaystyle x^3 - 2x^2 - ax + b $ and x-3 is a factor of P(x)

Q (x) = $\displaystyle ax^2 + bx - 5$ and Q(-2) = -2

Find the values of a and b

Second Question:A tennis ball thrown into the air follows a curved path described by the equation $\displaystyle h= -2t^2 + 5t + 2$

H is height, t is seconds

What was the greatest height the ball reached during its flight.

Looking for explanations rather than answers.

Thanks.