Consider that normally rental car companies get steep discounts on their bulk buys. They didn’t with their Tesla order which further hurts them. But, here is the overly simplified normal math:
(Resale Price + Rental Income - Maintenance - Purchase Price) / 2 years
Trick is that they generally flip these vehicles after 2 years and upsell an auto warranty which a big profit center as well. Resale price tanks and there goes all their profit.