Basic sampling problem - could use some advice
You are doing it correctly.  One minor change that I would make is to divide 2.5 into 5000, not 5001, to get the sample rate.  Two reasons- one, it appears that they purposely set up the problem to have a nice, neat number.  Two, because they are implicitly saying that there was a sample at time 0 and a sample at time 2.5, so there is an "extra sample" because there is a sample at both ends, so you should subtract one.

Anyway, that is a triviality.  You got the important concepts, and that is what matters.