The rule is one person at a time but Cuban Immigration are not heartless twits. Approach the booth with your friend and explain the situation in slow English and one of two things will happen: 1.) No big deal, or 2.) The official will force you back and deal with your pal one-on-one. Either way, don’t sweat it.
If there’s a problem you’ll quickly be brought in. If there no problem then your friend will be buzzed through the door and you’ll be together two minutes later.
I know it’s a delicate situation - especially if your friend becomes immediately confused or agitated - but honestly, I think this is one of those go-with-the-flow situations.
Don’t lose any sleep over this… relax…