From EWR you can take the Air train and NJ transit to Newark Penn Station. From Newark Penn, You can take the Path train from Newark to WTC (22min) then take the A-Line to Howard Beach (Queens bound to Far Rockaway) about an hour. Then take the Airtrain from Howard Beach to JFK whichever terminal you need to get to. This route will take 100-115 minutes, and cost less than $15.00. But if you're unfamiliar with the transit system, then it might be confusing, otherwise you might have to Cab it from EWR to JFK which will cost ~$100
From EWR you can take the