How to arrive at the particular form of inequality as answer? 
The stratosphere is the layer of earth's atmosphere that is more than $10$ km and less than $50$ km above the earth's surface. Write an inequality which describes all possible heights $x$, in km, above the earth's surface that are in stratosphere.
Answer: $|x-30|< 20$

I can't seem to understand how we got to the answer. Why did we subtract $30$ from $x$ and where did the $20$ come from?
 A: \begin{equation}
10 < x < 50\\
10-30 < x - 30 < 50-30\\
-20 < x - 30 < 20\\ |x - 30| < 20\\
\end{equation}
A: From your question, we could plainly get
$$10 < x < 50$$
It is equivalent to
$$ -20 < x - 30 < 20$$
Thus 
$$|x-30| < 20$$
But to be honest, I see no reason the answer wants to write it this way.
A: It's possible that the answer you would come up with is
\begin{equation}
   10 < x < 50
\end{equation}
As some have noted, this isn't technically one inequality, but a compound inequality.
Nevertheless, there are two questions you can ask.


*

*Is this saying the same things as $|x-30|<20$?  

*How do I write my answer using absolute value?


For the first question, using the definition of absolute value, you get
\begin{equation}
  -20 < x - 30 < 20 \\
  -20 + 30 < x - 30 + 30 < 20 + 30 \\
   10 < x < 50
\end{equation}
Thus you can see that the absolute value inequality is saying the same thing.
For the second question, you need to find a value $k$ such that
\begin{equation}
  10 + k < x + k < 50 + k \\
\text{and}\\
  -(10+k) = 50 +k
\end{equation}
Solving for $k$ gives you $k=-30$.
A: More generally:
$$a \lt x \lt b \;\;\iff\;\; \left|x - \frac{a+b}{2}\right| \lt \frac{b-a}{2}$$
That's saying that $x$ is in the interval $\,(a,b)\,$ iff the distance between $\,x\,$ and the midpoint $\,\frac{a+b}{2}\,$ is smaller than half the length of the interval $\,\frac{b-a}{2}\,$.
The given problem follows from the above with $\,a=10\,$ and $\,b=50\,$.
A: Further information :
Use this propertie $|y| = \left \lbrace \begin{array}l y\quad &\text{if} \quad y\geq 0\\ -y\quad &\text{if} \quad y< 0 \end{array}\right.$
$|x-30|< 20 \iff \left \lbrace \begin{array}l x-30<20 \quad (x\geq 30)\quad &(1)\\\\-x+30<20 \quad (x< 30)&(2)\end{array}\right.$
$\left .\begin{array}l (1)\quad x-30<20\iff &x<50\\(2)\quad -x+30<20\iff &x>10  \end{array}\right\rbrace \implies \boxed{10<x<50} $
OR :
$|x-30|< 20\iff (x-30)^2<400 \iff x^2-60x+500<0$
$\Delta= (-60)^2-4\times(500)=1600\iff \sqrt{\Delta}=40$
$x_1=\dfrac{60-40}{2}=10  \;\text{ and} \;\quad x_2=\dfrac{60+40}{2}=50 \implies \boxed{10<x<50}$

