How far from the base of the ramp should the rocket start, as measured along the surface of the ramp?

Two physics home work problems

A ballistic pendulum is used to measure the speed of a fast-moving objects such as bullets. If a bullet is fired into a large block suspended by some light wires.

The bullet is stopped by the block, and the entire system swings up to a height h.

If the mass of the bullet is m=27g, the mass of the pendulum is M=0.61kg, and the height they rise to after the bullet strikes the mass is h=20cm.

Calculate the initial speed of the bullet, v (in m/s).

A 100kg rocket is to be launched with an initial upward speed of 50m/s.

In order to assist its engines, the engineers will start it from rest on a ramp that rises 59° above the horizontal.

At the bottom, the ramp turns upward and launches the rocket vertically.

The engines provide a constant forward thrust of 2,435N, and friction with the ramp surface is a constant 567N.

How far from the base of the ramp should the rocket start, as measured along the surface of the ramp?