Yes. It would be good to fly into JAC (Jackson Hole) and stay in Jackson or Teton Village. If your flight gets in before dark you may want to stay in one of the GTNP lodges. Then drive through GTNP (stopping as much as you have time for) and into YNP. I would stay in the park if you could get lodging or Jackson. The spend the next day exploring Yellowstone. You could spend the 3rd night in Cody and be ready for the drive to Cheyenne. Enjoy Frontier Days! It's fabulous fun!