There is always the option in a car lease to buyout the lease early from the dealership or the financial institution. The price of the purchase is the outstanding balance, the residual value and sometimes the applicable taxes. It is possible that the lessee did accumulate equity and the vehicle is worth more than what it cost to buy out. In that case, the lessee wins on such a transaction by selling it on the market after. It will cover the purchase costs and the lessee may make a profit.
However, this situation rarely happens at the beginning of the term, because the vehicle depreciates too quickly in the first two years. Gaining positive equity on the vehicle in the case of a car lease mostly happens towards the end, or doesn't happen at all if the residual value is set too high. You can always try to predict a gain or a loss in time if you calculate the depreciation of a vehicle vs. its outstanding balance.