Rather than read how others solve this I suggest thinking it through. The probability of at least two people sharing a birthday is 1 minus the probability of there being no shared birthdays at all. Imagine just one person in the room, who has a particular birthday. Now a second person walks in - the probability of him not having the same birthday as the first person is 364/365, so the probability of them having the same birthday is 1-(364/365). Now imagine a third person entering the room - in order for him to not share a birthday with either of the first two people his birthday must fall on one of the 363 remaining open dates, and the probability of that is 363/365. Hence the probability of three people all having different birthdays is (364/365)(363/365), and the probability of at least one shared date is 1 minus that, or 1-(364 x 363/365^2). Continue on for 4 people in a room, etc. For the general case of n people in the room the probabiliy of no one sharing a common birthday is (364 x 363 x 362 x ... x (365-n+1))/(365^n). One minus this is the probability of at least one duplicate birthday:
You need to clean this expression up a bit to get it in the form they want, but hopefuly this helps you understand how it's arrived at.