# Inequality problem with negative values

I'm trying to solve the following expression for variable $S$ and having some difficulty manipulating the expression because of some negative terms. I have that

$$QS(1+\frac{x_2}{S})+\frac{2y_2}{S}<QS(1+\frac{x_1}{S})+\frac{2y_1}{S}$$

where $Q<0$ and all other variables are positive. $x_2>x_1$ and $y_2>y_1$

My attempt is as follows:

$$QS+Qx_2+\frac{2y_2}{S}<QS+Qx_1+\frac{2y_1}{S}$$

$$\iff Q(x_2-x_1)<\frac{2}{S}(y_1-y_2)$$

multiplying this by $-1$ gives:

$$Q(x_1-x_2)>\frac{2}{S}(y_2-y_1) \iff \frac{Q(x_1-x_2)}{2(y_2-y_1)}>\frac{1}{S} \iff \frac{(y_2-y_1)}{Q(x_1-x_2)}<S$$

Is this correct?

Your work is correct, if it is clear to you that the manipulations at the end work because $Q(x_1-x_2)>0$.
it is correct because division by $y_2-y_1$ does not change the sign since $y_2>y_1$ by assumption.