There's an option C, it's more or less option A except that it wasn't an earpiece order but his own rehearsal training he was remembering as he went through the doors, and because he's a demented old coot he just said the thing he remembered instead of doing it.
Option A - he really did parrot his ear piece. Option B - he was half assedly trying to get the marines to salute him... And they didn't.
Both make him look bad. Excellent.
There's an option C, it's more or less option A except that it wasn't an earpiece order but his own rehearsal training he was remembering as he went through the doors, and because he's a demented old coot he just said the thing he remembered instead of doing it.