You wanted to build an app for the idea you have. For gyms. From your personality and app, I'm guessing you like working out. You needed someone with some technical ability. Maybe you recruited this cofounder or he was a friend of a friend? Maybe a close friend? You made a deal with him because you couldn't pay him, but "generous equity" in the company. He stayed at your house etc, because he wasn't getting paid in real money while you guys were building the app. I have a hunch you had a lot more business experience and money in the bank. Then it sounds like its likely a combination of him being a bit over his head and realizing that he wasn't a real cofounder and was just an employee. Then you decide to fire him and he says, "Hey wait, I've been working for free all this time!". Then the legal bit ensues and you have to "pay him" for his portion of the company that he likely said was for his work.
Did I get close?
And your comments about the lawyer are definitely not the kind of thing I would do publicly about a friend and definitely gives me insight into your character in general. You might want to reconsider keeping this public.