Can I make a line with both a slant asymptote and a horizontal. Why can’t you create an equation of a line that gets closer to a line as it heads to $\infty,$ such as $y=x$ or $y=2x+4$ and a horizontal asymptote that approaches something like $-2$ as it goes towards $-\infty.$  Can somebody please help me build an equation for this line.               (https://i.stack.imgur.com/kYaVS.jpg)
 A: As said by @Torsten Schoeneberg there are many ways to obtain such curves. However, (branches of) hyperbolas rank among the most natural ones.
Thus I propose the following general solution among the hyperbola family : for any real parameter $a>0$
$$y=\dfrac12\left(x-2+\sqrt{(x+2)^2+4a}\right)$$

Fig. Different branches for $a=0.5, 1, 1.5, ...4$.
How did I find this general equation ?
I have first considered the curve reduced to its asymptotes, i.e., with equation 
$$(y+2)(y-x)=0 \tag{1}$$
(the product of equations $y+2=0$ and $y-x=0$). Then I pertubated a little this equation by taking instead of it :
$$(y+2)(y-x)-a=0 \tag{2}$$
Now expand it as a quadratic in variable $y$ :
$$y^2+y(2-x)-(2x+a)=0 \tag{3}$$
and use the classical formula for the roots of a quadratic considering $x$ as a parameter.
A: An example of a function with asymptotes $\;y=-2\;$ as $\;x\to -\infty\;$ and $\;y=x-2\;$ as $x\to \infty\;$ is $$f(x)=\frac{\sqrt{x^2+1}+x}{2}-2$$ 
A: To amend my second comment, for what it's worth, here is my thought process how to get a function as demanded, and what I experienced when doing that "shifting and stretching".
So to start, I looked for a function with two different horizontal asymptotes for $x \to -\infty$ versus $x \to \infty$. Well, the $\arctan$ came to my mind. Now first I wanted to turn that in the general shape "0 on the left, but positive (so I can make it increasing) on the right". So I moved it up by $\pi/2$, whence it would go from $0$ at $-\infty$ to $\pi$ (or whatever positive value) at $\infty$.
$\arctan(x)+\frac{\pi}{2}$:

This, multiplied with $\frac{x}{\pi}$, will give something that will behave like $0$ to the left, but like $x$ on the right (so I thought):
$\displaystyle \frac{x}{\pi} \cdot \left(\arctan(x) + \frac{\pi}{2}\right)$:

Now shift it down by $2$. That will make $\lim_{x\to -\infty} =-2$, I thought. It also moves the slant asymptote down to $y=x-2$. To make good for that, I thought I move the graph to the left by $2$, which transforms the slant asymptote back to $y=x$ and does not change the horizontal one.
$\displaystyle \frac{x+2}{\pi} \cdot \left(\arctan(x) + \frac{\pi}{2}\right) -2$:

But now I noticed that ever since the second step I was off by a vertical shift of $1/\pi$. See, both asymptotes are a bit too low. Where does that come from? Well I realised that even though arctan goes to $\pm\pi/2$ (and my shifted version in the first step to $0$ resp. $\pi$), I multiply it with a linear term; which means that I have to find out how well the $\arctan$ approaches its limit up to a term of order $\frac1x$. And indeed, an expansion of $\arctan$ "around $\pm \infty$" is given by
$$\displaystyle \arctan(x) = \frac{\pi}{2} - \frac{1}{x} + \frac{1}{3x^{3}} - \frac{1}{5x^{5}} + ...$$ (for $x >1$) resp.
$$\displaystyle \arctan(x) = -\frac{\pi}{2} - \frac{1}{x} + \frac{1}{3x^{3}} - \frac{1}{5x^{5}} + ...$$ (for $x < -1$).
whose $-1/x$-term, by multiplication with $x/\pi$, indeed explained that constant $-1/\pi$ term. But then that's that,  one just removes it by hand, giving:

$$f(x) = \displaystyle \frac{x+2}{\pi} \cdot \left(\arctan(x) + \frac{\pi}{2}\right) -2 +\frac{1}{\pi}$$

Voilà:


Fun fact I learned on the way when deriving the "expansion around $\infty$": the derivative of $\arctan(1/x)$ is $(-1)\cdot$ the derivative of $\arctan(x)$; which abstractly implies that $\arctan(x)= C - \arctan(1/x)$ for some constant depending on the connected component of the graph we are on. And indeed e.g. for $x>0$, we have $\arctan(x) = \pi/2 - \arctan(1/x)$.
