There are only two trains per week from Beijing to Irkutsk. One is the #3/4 which departs Beijing on Wednesdays and passes through Mongolia.
Because you have a Malaysian passport, you would need 2 visas for Mongolia, so it might make more sense to take the other train which is the #19/20. This train departs Beijing on Saturdays and travels through Manchuria, a part of China and then crosses into Russia at Manzhouli/Zabiakalsk.
Because of the need for visas, the cheapest way to get to Irkutsk will be to take a Chinese train from Beijing to Manzhouli, cross the border by bus and then take a Russian train from Zabaikalsk to Irkutsk (if the direct train isn't available or no berths are available, then you might have to go Zabaikalsk to Chita to Irkutsk). This will be cheaper than any other combination to get to Russia.
The fares for trains within Russia will vary considerably with the particular train, the class of travel and the date of travel so there is no way to give you the information that you seek. In addition, the prices are reset each year in May and the holiday schedule in reset in January. Even estimating is difficult without knowing more. For an example of the variation in costs see #7 New RU Train sticky
Simple train schedules for Irkutsk to UU can be found using this website: Your Train - CIS train schedule. But again prices vary significantly depending upon travel dates, train number, class of service, etc.
Train schedule from UB to Beijing will also depend upon when you are traveling. At the present time, there are at least 2 trains per week. The #3/4 which departs Beijing on Sundays and the K23/24 which departs once a week during most of the year, usually on Saturdays, but sometimes during the summer on Tuesdays. See Partial Mongolian train schedule for one travel agency in UB's prices. Note that tickets will be less if purchased yourself at the train station, but since your time in UB will be limited, you may not have the option to buy them yourself.
Yes, you will need visas for Russia and for Mongolia. The Russian visa should be obtained in Malaysia unless you are a Beijing resident. The Russian visa is a bit complicated, since it isn't just the application and a fee. I suggest reading more about it in the New RU Sticky and then asking questions.
The Mongolian visa is more problematic. There is only an honorary consul in KL and I suspect that you can't get a visa there. That means that you will need to spend some time in Beijing, Irkutsk or Ulan Ude to obtain your Mongolian visa. Requirements for most European and North American passport holders are just the application and fees but you might need a Letter of Invitation from a travel agency or guest house.
Six days in UB really isn't enough time to get to the Gobi desert or Lake Khovsgul. Check out this thread for ideas of what to do with this limited amount of time: 7 days in Mongolia.
Overall, this will be an expensive trip. Trains won't be cheap. Visas are expensive. Also travel will take much longer than you imagine. Distances are much larger than most people realize.
Personally, since you would need a visa for both Russia and Mongolia and your time and budget are limited, I would suggest changing your plans and going either to Russia or to Mongolia but not to both. If you travel to Russia only, I would suggest taking the train there, traveling from Beijing to Harbin to Manzhouli, crossing the border, traveling from Zabaikalsk to Ulan Ude, stopping for a day or two, then Irkutsk for several days to visit Lake Baikal, then to Krasnoyarsk for a day or two and on to Novosibirsk. From Novosibirsk, you can fly back to Beijing.
Or Take the train to UB, spend time in UB, during your time in UB arrange a tour to the Gobi Desert for 5-6 days, if you still have time, then arrange another tour in Mongolia or if not, then return to Beijing. It takes an extra day to return via the local train, cross the border and the overnight bus but it is about half the price.
Ruth