I raced Rotax from 2008-2012–and had the motor rebuilt once (after 33-ish hours) for about $1100. I’m guessing the motor was about $2600 (I bought it as part of a package, and it had just had a complete rebuild)
I’ve spent $2500 for my Yamaha rebuilds, and am due for another rebuild at the end of the season. I’d say that I have about the same time on my KT as I did my Rotax.
My point is that I think the Yamaha is more expensive than the Rotax.
Now, having said that, I never spent the resources in Rotax to make sure I was jetted correctly, and was never competitive–not even close. But I was immediately fast (enough) in Yamaha (the first race I was within a tenth of pole), and am extremely happy with my engine builder.