It actually takes less time to boil water at higher elevations, at a given heat setting of the stove, because the water starts boiling begins at a lower temperature, and remains at that temperature while it boils. What I think you meant to ask is "Why does cooking food by boiling take longer at 5000 feet than it does at sea level?"
The reason this is true is twofold: (1) Water starts boiling when the temperature is high enough to make the vapor pressure equal to the atmospheric pressure. Vapor pressure, which measures the tendency of water molecules to escape the surface, rises with liquid temperature. When the outside pressure is reduced, a lower vapor pressure and therefore a lower temperature is sufficient to allow boiling. (2) The atmospheric pressure gets lower as altitude increases, because of the reduced amount of atmosphere above.
Thanks for this opportunity to help you. If my answer was helpful, please click the Accept button. If not, please click Reply.