If the ray is traveling 5800 miles per hour from earth how long would it take to hit the moon?

The mean distance from the Earth to the Moon is 238,857 miles; divide that by 5800 miles and you'll get how many hours it would take.