Jeez if you knew, why are you asking?
The most popular cause of popping out of gear is the trans not being shifted fully into gear, which is caused by bad shifter bushings, not allowing the fork to fully engage the gear.
So, the cheapest/easiest thing to do first is replace the TWO shifter bushings. The larger ring bushing, and the smaller cup bushing.
After that, if it still pops out you have internal trans issues. Most likely being the sleeve and gear teeth. Which is more expensive than getting a used transmission. Plus the labour that you'd have to pay, because it requires special tools and know-how to repair a transmission. You're more likely to mess up a trans repair than an internal engine repair.
Now you said it's popping out of 1&3 which are both 'up' and that means you most likely need bushings.
In any case, bushings are $25 and require 1/2hr to change (max). Internal bits are considerably more than that.
Hope that helps.