UB to Beijing ticket can be purchased at the train station.
turtlesx2 - did your ticket prices include the cost of the fedex charges? Hopefully you understand that someone probably need to go to the airlines to buy the tickets, then go to the fedex office and arrange to send you the tickets. Certainly you paid more than locals but then you were receiving a service, a local would go and do it directly.
OP - Only two airlines operate from UB to Beijing - MIAT and Air China. Why not try to contact them directly yourself and see what price quotes you get.
The train operates 3 times a week from UB to Beijing. Trip takes 30 hours. How far in advance you need to book depends upon when you are traveling. For certain dates in July (immediately following Nadaam which is 11-13 July) tickets already may no longer be available.
Ticket costs for the train depend upon the day of the week that you travel and the class of service.
If you want to purchase the tickets through an agency in Mongolia try Selena Travel, Legend Tours or Ocean Travel. The latter is Chinese but has a UB office. Try contacting Richard Tian of Ocean Travel, whose email is oceantravelcn@yahoo.com.cn or richards@public3.bta.net.cn. Reportedly these companies are quite reliable about obtaining the tickets at a fair price (though higher than if you did it yourself.) Be sure to add them to your address book so that your spam filter does not "Eat" their responses.
Ruth