I just replaced those bearings on my QT50. I used these.
You will need to press on the one the fits close to the teeth. I used a vise and a deep socket. I also used some washers as the deep socket wasn't deep enough. I also put something in front of the pinion to keep it safe from the vise jaws.
I also replaced the wheel bearings. I used these.
Let me know if you have any questions.