You'll have to clear immigration and customs at Boston and following that you'll know how much time you have remaining out of your 6 hour layover. Did you think about going into the city for an hour or two? It's a long time since I was in the AA lounge in Terminal B but it was nothing special and pretty crowded.