Saw through the broken stair post and remove both parts from the staircase.
Bore the hole in the top rail 1/2 inch deeper with the appropriate borer bit fitted to an electric drill. Be careful not to bore through the top rail.
Slide the top of the replacement post unto the top rail hole and slide the bottom in place.
Remove the post and put wood glue on both ends. Slide the post back into place and wipe up any glue that has seeped on the outside of the banister.
Clamp the post to the top rail and to the bottom rail. Let it sit for several hours to cure completely according to the wood glue manufacturer's instructions. Wipe up any glue that seeps out.
Remove the clamps.