I would do whichever leaves you more backup flights if you miss your connection to JFK. In your case it seems like this would be the MSN-DTW-JFK option, for a number of reasons. First, there are going to be more DTW-JFK flights in 5 hrs than there are from MSP-JFK in 2 hrs (without looking at the schedules), and also, getting in to JFK earlier is better because if you have a weather delay or ground stop or something, you'll have more padding in the schedule w/ 5 hrs vs 3 hrs. Just make sure there are a couple DTW-JFK flights after your scheduled one, because MSN-DTW-JFK w/ 30 mins in DTW could be tight.