Both destinations are served by Ayodhya (AYJ). Since there's no flight route between them, the best way to travel is by road.
Basti
Fly to Ayodhya (AYJ), then travel by road to Basti. Taxis, buses, and private cabs are available from the airport.
Ayodhya
Fly to Maharishi Valmiki International Airport Ayodhya Dham (AYJ), then travel by road to Ayodhya. Local transport options include taxis, auto-rickshaws, and state buses.