I just went through through this at JFK. You might be ok. I had less than two hours to arrive in Terminal 1, retrieve my bag from baggage claim, get the train to terminal 5, check in for an international flight and then get through security to my gate. It worked fine and I arrived with 10 minutes to spare before boarding - BUT - I had no wait for my bag, no line at check in and no line at security. I do not think I would have made it if I had to wait at any of those places. You will probably be ok with 3 hours, but don't stop anywhere - keep moving until you get to your gate!
I just went through through