Both destinations are served by Coimbatore (CJB). Since there's no flight route between them, the best way to travel is by road.
Ooty
Fly to Coimbatore (CJB), then travel by road to Ooty. Taxis, buses, and private cabs are available from the airport.
Coimbatore
Fly to Peelamedu (CJB), then travel by road to Coimbatore. Local transport options include taxis, auto-rickshaws, and state buses.