Yellowstone is one of my favorite destinations. I grew up in Wyoming and have family in Gillette, Riverton and other places in Wyoming. I drive all these roads from time to time and don't hesitate to drive any of them if it is the most expedient.
This
LINK is the way I would go simply because it is the easiest.
Here's why, between Buffalo, WY and Tensleep, WY lies Powder River Pass. I'm sure your motorhome would have no problem navigating it but why? Powder River Pass is a significant mountain road. The climb from Buffalo at 4600' to the summit of Powder River Pass at 9700' is 5100'. As a comparison the rise from Vail, CO at 8100' to the summit of Vail Pass at 10,700' is 2'600'. Powder River Pass is twice as much mountain as Vail Pass. This forum has continued conversations on ways to avoid driving Vail Pass!
It will take at least an hour longer going over Powder River Pass then the others because of the mountain driving with your motorhome.
Going to Moran, WY from Spearfish I would take the route shown on the attached map. There are no significant elevation changes on that route until you are approaching Moran. Togwotee (Tog-e-tee') Pass lies between Dubois and Moran. You will have to traverse it any route you choose.