The PTO shaft should slide easily out of the gear. If stuck it may be burred or stuck from old oil or dirt build up. You may have to wrap a piece of leather around the splines and then use a mini vise grip pliers using the leather to protect the splines and pull or pry carefully the shaft from the gear. Being careful not to harm the thin housing.