A flagpole that is 30 feet tall casts a shadow that extends 42 feet from the base of the flagpole. What is the distance from the top of the flagpole to the end of the shadow?