
Quoting
Mr. Knowitall
As your landlord is willing to sublease, if you find a qualified replacement subtenant who is reasonably acceptable to both your roommate and your landlord, you may defend against any claim for unpaid rent by documenting that fact to the court. However, it can be a steep hill to climb to prove that a proposed replacement roommate is objectively acceptable to your roommate, given that people are allowed to be selective when deciding with whom they will share living quarters.
If you cannot find a replacement roommate that your landlord and current roommate will accept, you may want to consider seeing if your landlord will allow you to pay an agreed sum of money to cancel the lease.