Why is the equilibrium constant being calculated differently here?
It's a matter of definition, really.  Equilibrium implies a reversible reaction, thus the same reaction could he rendered as $\ce{A&lt;=&gt;B}$ or$\ce{B&lt;=&gt;A}$.  So we can render the equilibrium constant as $[\ce{B}]/[\ce{A}]$ or as $[\ce{A}]/[\ce{B}]$.  We need to define which is used, of course, when we give a numerical value.