Ceiling junction box has 6 wires?
Well, here's what I think you've got.   You know that the lamp in Box A works and once you traced the wires it was easy to chase it back from that.  

The wiremold surface conduit brings power (always-hot and neutral) into the system. 

Nut 3 is neutral, using (very bizarrely) blue for neutral.  Which is the standard in Europe (though they prefer a robin's egg blue) - not legal in North America (white or gray please).   

Oddball colors like that are possible in conduit (such as this surface mount) since they are THHN individual wires.  Possibly the other wires are multiconductor cable (NM Romex or metallic AC) always black-white. 

Nut 2 is switched-hot for your lamp.  Black is a legal color for switched-hot (or any hot) but red is ideal. 

Nut 1 is always-hot.  Note that it's using a white wire in the switch loop, which is actually a Code requirement when using multiconductor cable like NM or AC however the wire must be taped to identify it as a hot.

In this diagram, I go well past the mandatory markings to mark every wire with "tape" whose native color doesn't match its function.  All these markings are legal except the blue wire - neutrals must be natively white or gray (even in cable), and blue here is a code violation that isn't fixed by marking it. 



My guess is before the condoization, it was powered at the light switch off a circuit that served other areas of the office which are now part of other dwelling units.  That breaker would've been in someone else's condo, which violates Code.  This work was done competently by an old-head who knew what he was doing... except the blue wire! Perhaps a European immigrant... 

As for grounding, I would pop the cover off the "surface conduit starter box" over on the right wall, and see what's behind it.  If you see a steel junction box with tubular conduit feeding down to the panel, that EMT or IMC or rigid conduit is a valid grounding path.  The back of the box will have a hole tapped #10-32, I'd get a ground screw (they sell them at electrical supply by the one, or big-box by the ten, they're even green so you don't mix them up with general hardware) and some #12 bare ground wire, and bring it to each of the junction boxes via the Wiremold surface conduit.