You can probably arrive to EWR much later than you might think, especially if you have TSA pre-check and aren't checking a luggage. Terminal B security is usually a breeze and the gate is less than 5 minutes walk. Much more pleasant than any of JFK's nightmarish terminals. I arrived by around 8, but honestly I could have arrived at 8:30am and not had any problem making the flight (although I wouldn't recommend cutting it that close).