Holding the mainshaft by its tail end, move it back to the case centerline.
You'll have to manually guide the 1st./reverse shift fork into the gear slot (2nd./3rd. should be lined up from the previous step, but you might have to tweak it a bit too).
With the shift forks engaged in their respective slots, gently press forward on the mainshaft, while simultaneously moving the 2nd./3rd. gear lever back to the neutral position!
The entire mainshaft assembly will move forward to its final position, and the bearing retainer should drop nicely into its recess in the rear of the case.