Hall Effect Speed and Distance Sensor Code

Could someone give me an example code of how I would program the arduino to calculate and display distance?

What equation are you planning to implement? You already have variables with all the relevant values. Using them in an equation is not rocket science. You aren't learning a thing when you copy and paste code.