Get out and stay out.
From an evolutionary standpoint, it's great that this other guy can spread his seed and have YOU pick up the slack.
From an emotional point of view, she's using you. She's vulnerable (in more than one way) and is looking for a crutch.
From a guys point of view, hooking up with a pregnant girl is low. Go and get your own and knock her up.
From a financial perspective, it's a monetary sink which will consume roughly $1,000,000 by the time the child turns 18.
Look, it's not your child and not your responsibility. This girl was irresponsible in who she choose to mate with and the persons child she is now bearing. If she is that bad in this major life decision, then you don't want her.
Right now, she can go after him for child support with a patternity test in the US. If you hook up with her, he can start to argue you two are together and therefore remove the support he owes the child.
Again, be friends but do not enter into a relationship with her. It's simply not fair to you.