That's easy to figure out...
Kirk is Captain after his battle promotion in the last one.
We've got Spock as Commander who has not been promoted for whatever reason.
Scotty is Lieutenant-Commander according to his insignia on his sleeves, so is Bones.
Sulu and Uhura as Lieutenant and Chekov as 18 year old Ensign.
So if Kirk and Spock leave, Scotty and Bones would be the highest ranked officers onboard, if there is no other. But considering their special expertise they've got better things to take care of, so does Uhura as she speaks all three Romulan dialects fluently. That would leave Hikaru in command, as he is not only a helmsman, but also a command officer.

A medical doctor would not normally be left in command no matter what their rank.
Likewise a lieutenant might be left incharge of the bridge in non emergency situations even when there are more senior officers elsewhere on the ship.

Of all the things I am hoping for, seeing Simon Pegg's Scotty sitting in the Captains Chair is one of them (as well as performing miracles either in the Engine Room or crawling round in the bowels of the ship)