An electrician needs to run a cable from the top of a 40​-foot tower to a transmitter box located 30 feet away from the base of the tower. Find how long he should cut the cable.