Take the A train to Howard Beach and then the Air Train to your terminal or LIRR from Flatbush Ave. to Jamaica and the Air Train from Jamaica to your terminal. Two hours before departure is the "standard" but you can sometimes breeze through check-in and security in just a few minutes.
Take the A train to Howard