You will have to establish an equation for conservation of momentum in each of the vertical and horizontal directions.

Before you can do this you must represent all velocities by their vertical and horizontal components.