Gear position does not matter.----You need to remove the rear cowling to find one bolt.-----Shift rod nust be disconnected through window/s on the side of the motor.
That is the drive key for the impeller.--It also appears to be a new updated impeller housing.
#31 o-ring on top of the housing is very important. If missing, it won't run correctly with the hood on.
O-ring # 27 fits in the groove at the spline on top of the drive shaft.
You should see that on the drive shaft when you removed the lower unit !----That O-ring #27 should be in the groove on the driveshaft.---It fits at the top of the driveshaft as mentioned.-----It seals the joint between the spline on the driveshaft and the spline on the crankshaft.-------Keeps grease in and moisture out.
The driveshaft must come out with the lower unit !--It usually does too.--Nowadays on motors that have had no maintenance or proper care there are some that stay in there.------You must remove it for proper re-assembly.-----If it is rusted in there it can be a chore to pull it out.-------Then the next thing to consider is the condition of the spline in the crankshaft.----If it is badly rusted ( carbon steel ) then you may have a short lived / parts motor on your hands.
Oh, and I forgot to mention. #31 being missing could have contributed to the problem you are having with the drive shaft. With #31 out, exhaust (and water) blows up to the area where the drive shaft slips into the crankshaft. That can cause excessive rusting. However, somebody usually discovers the problem because of the poor running before the rust gets that bad.
The chip in the impeller housing, and the loose drive key, is because you had to force the gearcase down since the driveshaft is stuck. So, you busted through the impeller housing with the key to free it up. As stated, not normally done like that.