[tex]\bf \begin{cases}
\textit{function's range, is the values of "y"}\\
\textit{function's domain, is the values of "x"}
\end{cases}
\\\\
thus\qquad f(x)=y=x+5\to
\begin{cases}
y=7\\
y=9
\end{cases}
\\\\\\
then\implies
\begin{cases}
7=x+5\implies ?=x
\\\\
9=x+5\implies ?=x
\end{cases}[/tex]
solve for "x"