There are two ways to get from the PA Bus Terminal to JFK Airport, and both are public transit.
Option 1: Subway
Step 1: purchase a $7 pay per ride (regular) MetroCard, NYC version of the Charlie Card, and take the Queens-bound (eastbound) "E" train (Blue Line on the subway map) from 42nd Street-PA Bus Terminal to Sutphin Blvd-JFK/Jamaica Station.
Step 2: at Sutphin Blvd-JFK/Jamaica Station, exit the subway station into Jamaica Station and follow the direction sign directing your the JFK Airtrain. Take the Airtrain from Jamaica Station to all terminal.
Now the reason, I said to purchase a $7 pay per ride MetroCard, because you will be paying to ride both the subway and Airtrain. The fare on the subway is $2 and and on the Airtrain is $5.
Option 2: LIRR
Step 1: purchase a $7 pay per ride (regular) MetroCard, NYC version of the Charlie Card, and take the downtown (eastbound) "A", "C" or "E" trains (Blue Line on the subway map) from 42nd Street-PA Bus Terminal to 34th Street-Penn Station. The fare on the subway is $2 one way.
Step 2: at Penn Station, exit the subway into the station and take any eastbound LIRR train (except the Port Washington Branch) from Penn Station to Jamaica Station. The one way off peak fare will cost you $5.25.
Step 3: at Jamaica Station, transfer upstairs to the Airtrain, which will take you to all the terminal. The fare on the Airtrain is $5.
I hope this information is very helpful. If you have any questions or need travel directions while in town, just drop me a line by clicking on the avatar and e-mail icon in the profile. I'll be glad to help.
Native New Yorker