Buy the TourSaver book online. One glacier cruise will pay for the book. The book includes many nice things to do. Doing the sternwheeler trip in Fairbanks was good.
Be sure to check the 'Sticky' at the very top of this forum page for many helpful hints and things to do and things to take.
I don't understand the Flag train from Talkeetna question but do stop in Talkeetna for a look see. It's very small but fun. It's close to Denali Nat'l Park.
When you go to Denali try to stay in the farthest campground you can stay - Teklanika. We only made its reservations 3 weeks prior as we were traveling so we could better judge when we'd be in the area. We spent 5 nights at that campground and an additional 5 nights in Denali's Riley Creek campground. There is lots to do in both areas of the park. When staying at Teklanika you should buy the TEK bus pass. The tour bus stops at the campground entrance many times during the day. You can then ride as often as you want and as far as you want - one price. We took one long day trip to the end of the road but the other days we went out in the morning and late afternoon for short trips. We saw 'THE' mountain 7 out of our 10 days and saw every large animal in the park - many more than once. We were there mid-August and the weather was perfect with lots of blooming flowers.