context: Holly Berenson (Katherine Heigl) is the owner of a small Atlanta bakery, and Eric Messer (Josh Duhamel), (often just known as "Messer") is a promising television technical sports director for the Atlanta Hawks. Their best friends Peter (Hayes MacArthur), an attorney, and Alison Novak (Christina Hendricks) set them up on a blind date that goes horribly wrong, and results in both hating each other. As the years go by, Peter and Alison get married, and have a baby girl named Sophie Christina, and select Holly and Eric as godparents of Sophie. They have become friends, but still tease and banter with each other.
  After Sophie's first birthday, Peter and Alison die in a car crash. Holly and Messer learn that in their friends' wills, they were named Sophie's joint guardians. Holly and Messer must put their differences aside and move into Sophie's home to care for her. Living together proves to be a struggle. One night, Holly leaves Sophie with Messer while she covers an important catering job - the same night that he is given the opportunity to direct a big basketball game. Messer takes Sophie to the game, but she constantly distracts him with her crying. When they get home, Messer and Holly argue, but later they make up.
  Holly meets Sam (Josh Lucas), Sophie's pediatrician, and finds herself attracted to him. They arrange a date, which is cut short when Messer calls to tell Sam that Sophie has a high fever. Sam and Holly go to the hospital, and Messer sees Holly kiss Sam.
  As the two guardians continue to care for Sophie, they discover that raising a child is much more expensive than they had expected, and Holly can no longer afford to implement her plans to expand her business. Messer offers to invest in her company, and eventually Holly agrees. To cement the new relationship, they decide to go on a date. They end up having sex and begin to develop feelings for each other. Their Child Protective Services caseworker, who has previously advised them against getting involved, tells them they must make a firm commitment either to stay together, or break up. Anything in between would be bad for Sophie. Messer is offered a job in Phoenix, Arizona, and he seriously considers taking it up, as it has been his dream for several years, but doesn't discuss it with Holly. Holly is upset when she finds out and tells him to take the job, accusing him of looking for a way out of raising Sophie. Messer goes to Phoenix.
  At Thanksgiving Messer returns to Atlanta, hoping to patch things up with Holly (who is hosting a big dinner for neighbors and friends), but finds her in a relationship with Sam. Messer and Holly argue, because Sam mentions Holly is planning to sell the house soon, since it is too expensive to keep up. Messer insists it was Peter and Alison's wish that Sophie be raised in their home, by them together. Holly consistently accuses Messer of deserting her and Sophie, while Messer points out how quickly she replaced him. Messer tells her he loves her, but leaves the dinner, planning to return to Phoenix. Once alone with Holly, Sam says that if he and his ex-wife had fought in the way that Messer and Holly did, they would still be together. He tells Holly it is obvious she needs to work out her feelings for Messer, and leaves.
  The caseworker comes for the last appointment to determine whether Holly and Messer are fit parents for Sophie. Holly realizes that she can't take care of Sophie without Messer, and that she loves him. She and Sophie drive to the airport with the caseworker. Holly rushes to buy tickets for all three of them to gain access to the departure gate, but on arriving at the gate, finds that they have missed Messer's flight, which has departed. She returns to the house disappointed. To her surprise, she finds him sitting inside. He tells her he has realized that Peter and Alison chose them to be Sophie's guardians because, together, they are a family.
  At Sophie's second birthday party, all the neighbors and friends in attendance. Holly has made an elaborate cupcake display for Sophie, as well as another cake with the number 1 on it. When Messer asks what the cake is for, she says, "It's for us, 'cause we made it a year." They kiss. The guests sing 'Happy Birthday' to Sophie.
question: How are Peter and Alison killed?
answer: Car crash