Asking for a friend. Please help her out

Adriana
(asking for a friend ) my friend recently got into a relationship. She started talking to him in July but he just separated with his wife and he had a girlfriend when they started talking but she never said anything because she was waiting to see if he was going to say anything because they both were starting to catch felings but he never said anything and he continued to act like she didn't know about his girlfriend but one day she slipped up and said something about how rude he was to be talking to her when having a girlfriend and just got out of a marriage but he ended up leaving his girlfriend and they got together but like a few weeks go by and one night he asks if he can hangout with some friend from high school and didn't really talk to her that night so she just thought he was having fun. The next morning she received a text from him saying how they need to split because he was getting back with his wife so he lied about going with his friend. They were together like a week before he got back together with my friend but recently she went through his phone and saw all the message between them when they were broken up (wife and boyfriend) he was telling her how much he loves her and will always love her and just one day he leaves her and gets back with my friend and the day they got back together he was telling her how much he loves her. They are not divorced yet because in the state of Maryland they have to be split up for 12 months. She's scared where there still married that he will still get back with her like he did before. Someone please help my friend out