The only way that trans can be saved is flushing it with tons of ATF. When I say tons, I mean like 36 quarts to try to get every trace of water and coolant out of it. This works for some and fails for others but it's worth a shot.
This video will help you with the flush:
<iframe width="560" height="315" src="https://www.youtube.com/embed/RumPXivBlk8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
If the trans is not salvageable, I wouldn't try taking it to a shop to get it rebuilt unless you know of a really competent local shop with great reviews for their work.
As for putting a used one in, that's a serious roll of the dice that you got a good one and not one that's on it's last legs. If you're going to do the work yourselves, maybe take the risk on a used one. If you're going to pay a shop to replace the trans, that's a whole lot of labor you're going to be paying for that might have to be repeated if the used trans ends up being a piece of junk.
If your neighbor is planning on keeping the rig for a very long time, I would suggest buying a remanufactured transmission from Toyota. It's going to be expensive but it's going to be the best option for longevity.
Here's a video series you guys can use to swap out the trans:
<iframe width="560" height="315" src="https://www.youtube.com/embed/oZDSjlxl2Q4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/O4GA3UhPC5Y" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/T4YY3IfnzaQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>