These two engines share very little in common actually, the 5.8 block is taller and wider and much more durable but the good news is it uses the same engine mounts and trans bolt pattern so it will physically bolt in where the 5.0 was. You will need the complete 5.8 motor and you will have to determine exactly what transmissions both trucks have because there are 4 different automatics that could have been used, the trans code on the drivers door calibration decal is what you need to find and then compare it to the codes here..
Ford Axle Code Chart .: Articles
Now if you're real lucky both trucks will have the same trans but even if they don't you can make the engine swap work with the correct flexplate, and if you have the worst case scenario where the 5.0 truck has the 4R70w the job is still possible but you're gonna have to use the trans attached to the 5.8, and that's because the 4R70w is computer controlled and it was never factory installed behind a 5.8 so there are no compatible PCMs for it. In any event I have had both of these motors in my '90 so I can help you out with the details, just figure out what transmissions you're working with and we'll go from there.