They wore the same braid, only on differently colored shirts. Spock wore the same golden color as Kirk, which we might take as indication that he was the XO. Single braid vs. Kirk's two.
http://tos.trekcore.com/hd/albums/1x03hd/wherenomanhasgonebeforehd017.jpg
Mitchell wore the same brownish color e.g. Scotty did, again with single braid.
http://tos.trekcore.com/hd/albums/1x03hd/wherenomanhasgonebeforehd034.jpg
Spock's rank was never brought up in dialogue, although we'd expect it to be at least Lieutenant like it was back in "The Cage" (in terms of in-universe chronology, of course - studio chronology would be a different issue because continuity with "The Cage" obviously wasn't a requirement at that point yet).
Mitchell is referred to as "commander" once in the scene that introcudes Dehner, and Kirk later calls him Lieutenant Commander in a posthumous log; there's also a screen graphic that suggests Mitchell is a Lieutenant Commander - or rather, that he held that rank when he was 23 and this psycho-medical assessment of him was made.
http://tos.trekcore.com/hd/albums/1x03hd/wherenomanhasgonebeforehd238.jpg
So Spock might also be a Lieutenant Commander here. Certainly we have no explicit evidence that the two would hold different rank, and little implicit reason to think so.
The system of rank braid in this episode might of course contain surprises, such as subtle differences in color or texture denoting differences in rank. Such things don't seem to apply to other Trek episodes, though. If we try to shoehorn the pilot episodes into the continuity that otherwise seems to reign from STXI to TOS, TAS and ST:TMP, the single braid ought to mean Lieutenant (and dialogue from "The Cage" concurs, even though dialogue from "Where No Man" does not), and young Kirk here ought to be a captain of Commander rank.
Going further down that lane, we'd then have to explain why Mitchell wears the "wrong" braid, half a braid too little for his rank. If we choose to say that he was only recently promoted and does not wear the metal yet (which would also mean he's mere 23 or 24 years old, as per the computer readout), or perhaps that he is in the habit of dressing sloppily and his pullover for today is incompletely braided, we then probably have to accept that he holds superior rank to Spock's, because it would be a bit of a stretch for the same set of special circumstances to apply to
both these officers... And this then carries assorted implications.
Spock is only identified as the science officer, by Kirk in the briefing room scene.
Even that is awfully vague. Kirk merely says that he expects his science officer not to hide unpleasant truths. And he says that to Elizabeth Dehner, who has attempted to hide unpleasant truths about Gary Mitchell. So apparently,
Dehner is the science officer here. Or a science officer anyway.
Timo Saloniemi