The message board monitors seem to have a personal vendetta against me for whatever reason, so I am going to try to help this traveller out with pertinent information ONCE AGAIN.
Hopefully it will not get deleted by the idiots who monitor the message board.
OK, It is probably most cost-effective for you to fly into Bangkok, get your Chinese visa, then get a plane ticket BKK-Beijing-BKK.
BKK-Beijing-BKK on Air China or Thai Airways runs about 13,000 baht (US$325) round trip. Chinese visa, single entry, is about US$45 and takes 4 days to process. The Chinese Embassy is on Rachadapisek Road near the Rama 9 Road subway station.
TRAINING WISE, however, I think that you should just fly to Beijing first, run the race, and then if you want come on down to BKK. No visa is necesssary for Thailand assuming that you are a USA Citizen.
If you come to Bangkok first and train, you are going to be knocked out from the heat and humidity which takes a while to get accustomed to.
Another option is to visit the beautiful small city of Lijiang, at 8,000 feet altitude for some training, then fly to Beijing 2 days before the race. Book all your internal Chinese flights when you get to China.
Hope that answers some of your questions.
Enjoy your trip and good luck in the race.
jason