There are a few different steps to take to successfully remove a PTO shaft from a 2640 Massey Ferguson. First, use an appropriate wrench to loosen the PTO output shaft bolts. Next, disconnect the PTO shaft from the tractor and remove any clips that secure it. Then, use a pry bar to lift the PTO guard and shaft away from the tractor. Next, remove the four bolts securing the nut on the output shaft. Lastly, use a suitable wrench to remove the nut and the shaft, then carefully slide the PTO shaft off the tractor.