$y=x-2$
If a term doesn't have a coefficient, it is considered that the coefficient is $1$$y=1x-2$
Subtracting is the same as adding the opposite$y=1x+\left( -2 \right)$
Since the equation is written in slope-intercept form, $y=mx+b$, identify the slope of the line as the coefficient next to the variable $x$$\begin{array} { l }y=1x+\left( -2 \right),& m=1\end{array}$
Identify the $y$-intercept of the line as the constant term$\begin{array} { l }y=1x+\left( -2 \right),& m=1,& b=-2\end{array}$
The slope of the line is $m=1$ and the $y$-intercept is $b=-2$$\begin{array} { l }m=1,& b=-2\end{array}$