Re: evinrude 40 hp
By "rear" gear, you mean the forward gear in the nose of the gearcase?
I'm not totally familiar with that exact model but the useual procedure is pull up on the shift rod to put it in forward gear, that gives access to get the pinion nut off. Then remove the bolts holding the drive shaft bearing housing and pull the shaft out. It may take some persuasion to unstick it from the taper in the pinion gear.
Then you can remove the pinion gear from the housing. Then remove the bolts holding the shift rod cover, and unscrew the shift rod from the detent and remove from the housing.
Then the prop shaft and shift mechanism will pull out of the case.
Or, at least something similar to this.