Bob is right. Further explanation: in the first sentence, “marrying him” is still a possibility; the woman has the ability to decide, right now, whether to marry him or not, and her friend is giving her advice to say “yes.” In the second sentence, “marrying him” is no longer possible; the opportunity to marry him was in the past, and the woman didn’t marry him, and now her friend is saying “you made a mistake by not marrying him.”