First off, the part numbers for the new gears are as follows:
Gear, 3rd Wheel 5BF-17231-00
Gear,3rd Pinion 5BF-17131-00
Gear. 4th Wheel 5BF-17241-00
Gear, 4th Pinion 5BF-17141-00
Gear, 5th Wheel 5BF-17251-00
Gear, 5th Pinion 5BF-17151-00
There's a pattern, as you see, "5BF-17XY1-00". X= shaft# (main axle/drive axle[countershaft]), Y= gear# (3, 4, or 5).
If you want/need to replace the bearings, you can get the part #'s from Yamaha's web site and order from them or the TT-OEM store. TT-OEM is cheaper if you order all your gears (and bearings, if need be) from them.
I'll start this off presuming you dove in there and split your cases on your own. It's pretty simple, just undo every bolt you see. It's helpful to have a proper crankcase splitter to press the crankshaft out of the main bearings, but a steering wheel puller will work in a pinch. Even better if you're replacing the bottom end while you've got the cases apart (I'll cover that in another how-to). Then you can smack the crank out w/a hammer.
I'll also presume you have a manual handy. I won't cover all the intricacies that Yamaha does, though most of it is straightforward no-brainer stuff.
Without further ado:
Step 1: Look at your manual!
Get an idea of what you'll be doing. Check out the diagram and see the order in which the gears/collars/snap rings go. Compare the diagram in the manual to the actual gears on the shafts. The shift forks are individually labeled and pretty foolproof, they can be set aside for now.
Step 2: Lay out your new gears.
I recommend leaving them in the bags until they're installed to avoid confusion. I put my old ones back into the bags as well, just in case.
And yes, I know my 3rd wheel and pinion gears were on the wrong side.
Step 3: The front shaft (main axle). This is the one the clutch mounts to.
Using snap ring pliers, set to external, remove the first snap ring, then the gear. Repeat. I laid mine out in rows. Snap ring, gear, (next row) gear, washer (next row) snap ring, gear, etc...
Step 4: Once you've got the old gears removed, simply reverse the process with the new gears, minding the proper order of gears, washers, and snap rings.
The gear machined onto the shaft is 1st pinion. Next to it goes 5th gear pinion. The new gear is on the right, substantially more teeth.
After the 5th pinion gear comes 3rd gear pinion. The dogs on 3rd gear interlock with the grooves on 5th. This is part of the 'constant mesh' design. All gears are always spinning, however, the load is only transferred through the selected gear combination.
Next is 4th pinion gear. It has an internal collar that it rotates on, rather than the splines of the axle shaft. The way it interlocks with 2nd gear pinion provides the drive for the drive axle (countershaft).
It should look something like this when you're done.
Step 5: The drive axle (countershaft).
This one is a bit easier, as there's only one snap ring to deal with.
Pulled apart it looks like this, because we don't need to remove 2nd gear:
The order is the same as the other one, but backwards; 2,4,3,5,1, which makes sense because the gears need to mesh with their counterparts.
So, first we install 4th wheel gear against 2nd wheel gear. Once again, the new gear is on the right, 'face' up.
Next comes 3rd wheel gear.
Followed by 5th wheel gear.
Top it off with the stock 1st gear. Then lay the shafts alongside one another to check that the mesh is correct.
If that works out, set into the left side crank case with the shift forks and shift drum in place to confirm proper installation (and for a little practice). It may take a little wigglin' and finesse. Also, remember to dribble some oil (assembly lube) on the gears and especially the shift drum when putting it back together for real.