You know the angle of light entering the lens. The tangent of that angle gives you the ratio of (the distance between the lens and the laser) and (distance between the laser and the target). Which lets you work out the distance between the laser and target.