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.