If they leave 2 months early, they are still breaking the lease.
So start with the baseline: the tenant is responsible for rent until (a) the end of the lease term, or (b) until the landlord is able to find a new tenant to occupy the unit (the landlord must make reasonable efforts to do so, but the tenant is responsible for all costs of re-renting the unit), whichever occurs first.
The landlord holds the tenant's deposit until the end of the lease (this means that either a new tenant takes possession, or the lease period ends). The landlord can deduct from that deposit for any unpaid rent (including rent that accumulates after the tenant's early move out), and any damage to the unit "not associated with normal wear and tear").
If the tenant has already paid for "last month's rent" this money should be applied towards this balance.
If the deposit and the last month does not cover these fees, the landlord must send the tenant an itemized list of deductions plus a bill, and if the tenant does not pay, the landlord can sue the tenant for breach of contract.
If the deposit and the last month exceeds these fees, the landlord must send an itemized list of deductions plus a check for the balance remaining.