You should consult a labor lawyer in your area. You probably want to stay in good relations with your former company since one of the managers wants to hire you back. But you need to find out if anything can be done about the other manager who is badmouthing you. The continued badmouthing can not only result in you not being rehired, but could also affect your ability to find a new job with another company if you can't get a good reference. A labor lawyer may also be able to suggest how you can discuss the issue with someone higher up in the company. Perhaps the badmouthing manager does not have the last word regarding your rehiring.