Check related link below. for pictures and video. If you have disk brakes in the rear. they are install the same way the fronts are install... but if you have drums, please ask question again and relate that info to us so we then answer your question in a suitable manner.
If it has 4 wheel antilock brakes, the rear speed sensor is in the rear end. There is a 10mm bolt that holds it in place. One the front there is a sensor for each wheel. It will be at the hub and have a wire going to it.
On the 1997 Ford F150, the differential could be in both the front and rear. From 1997 and on Ford used two different axles. Your truck could either have the 8.8 or 9.75 differential. If you have a rear differential you would need to lower your spare tire to have access to it.