Here the setup is done for you. All you need to do is look at the free-body diagram to get the force picture and then the plot to get the new values. The ball hits the building when the x position curve returns to zero so we stop the model at that time. The altitude nay be picked from the right end of the y position curve. Notice that the y curve is unchanged by the addition of a purely x force.