My only issue with all of that is... when and how did R2 and 3PO get onboard? They were clearly on Yavin after the Admiral had already left to engage the Empire.
I think the dialogue said that the Admiral has gone up to the ship and that he intends to go to battle.
So he hadn't already gone, he was just getting ready, I assume it took some time to organize all those ships during which the droids boarded as well.