2 completely different types of vacation destinations. What are your interests?
Also, Atlantic City and Philly are about 1 - 1.5 hours away from each other. Are you planning on staying in both cities for a night, or stay in one and drive to the other for a day?
that would be something you'd have to decide - what are you looking for in a vacation?... there is no real comparison between AC and the Hamptons...AC is a beach town but also has casinos... Philly is about an hour from AC so you'd probably stay one night in AC and 1 night in Philly...but 1 night wouldn't give you enough time in either place.
If the two nights are not on a Friday or Saturday, then yeah AC is the cheaper option, and just stay there for the full 2.5 days.
As noted Montauk/Hamptons are quite different from Atlantic City except maybe both have swimming, fishing, and a lighthouse. You are correct the Hamptons are mostly more expensive than AC. Both have a variety of restaurants, but AC has a much wider variety to chose between. The water is normally warmer for swimming in AC than the farther north, end of Long Island. And, of course, AC has gambling all day and night, and a world famous Boardwalk, although during the summer parts of the Hamptons have become popular, (as AC is year-round), for weekend partying by usually younger city folk.
All 3 places you mentioned have more history than you could enjoy or absorb in only 2 days.
Pick one and have fun.