Then you should lower the aperture on your camera. The camera can only be have 1 focus distance, but lowering the aperture will widen the area around that focus point that will be in focus. Also, you should only have on length call in your expression. Right now it calculates all three lengths but you only get Text 3 because that is the last length that it calculates.
-Lloyd
https://aescripts.com