Error in formula for the solution to a chemical problem
The equation is a little dubious, as I mentioned in the comments.


  How do we come up with coefficients of this sort?


Let's go from scratch. We don't know the coefficients at this point so we'll just call them $a$, $b$, and $c$. Note that the coefficient of $\ce{S$_x$H$_y$O$_z$}$ is taken to be 1. It doesn't have to be 1; however, for the sake of simplicity you might as well take it to be 1. If you take it to be 2, then you just have to double all the other coefficients.

$$\ce{S$_x$H$_y$O$_z$ + $a\,$O2 -&gt; $b\,$SO2 + $c\,$H2O}$$

In the reactants, we have $x$ sulfur, $y$ hydrogen, and $z + 2a$ oxygen. In the products, we have $b$ sulfur, $2c$ hydrogen, and $2b + c$ oxygen.

Our aim is to express $a$, $b$, and $c$ in terms of $x$, $y$, and $z$. Equating all three, we get

$$\begin{align}
x &amp;= b \\
y &amp;= 2c \\
z + 2a &amp;= 2b + c
\end{align}$$

which immediately tells you that $b$ and $c$ are equal to $x$ and $y/2$ respectively. Substituting these into the last equation,

$$\begin{align}
z + 2a &amp;= 2x + \frac{y}{2} \\
a &amp;= \frac{4x + y - 2z}{4}
\end{align}$$

So the full equation is:

$$\ce{S$_x$H$_y$O$_z$ + $\frac{4x + y - 2z}{4}$O2 -&gt; $x\,$SO2 + $\frac{y}{2}\,$H2O}$$