This is the UA thread....UA operates out of Terminals A and C at Newark....if the OP is confused about the airport he needs to sort that out. If he really means EWR UA runs a shuttle bus from Terminal A to Terminal. It saves you from having to leave and re-enter the secure area and it about the only way you will make a 40 minute connection.
If he really means LGA, I have no clue.