I highly recommend switching your RDU-EWR flight to one that arrives at LaGuardia, which is much closer to JFK. A 3-hour connection between EWR and JFK is cutting it close, and an expensive taxi or car service ride is going to be the fastest way. You can get from EWR to JFK via public transport for as low as $4.60 per person, but it's going to take you two hours or more.
If you're flying American Airlines, they should allow you to fly standby on a same-day RDU-LGA flight at no cost if there are seats available; LGA and EWR are considered "co-terminals." It's only a $20 cab ride from LGA to JFK, and even with heavy traffic it shouldn't take more than an hour.