A lot goes into this. How big is the ball, is air resistance going to be a factor, is the ball spinning, how heavy is the ball, what velocity is it being projected at, how far must it go before it hits the wall? One thing you could do is just shoot the ball about 10 times and mark where the ball hit and then adjust the laser to point there. If you are looking at predictive power with a changing setup you will of course need to develop a physical model. Look into books on computational physics for this. Obviously gravity is your dominant force here, so the standard equations of one-dimensional motion might do just fine, but if these other effects are large then a more complex model will have to be devised.