Please help me! This is is rational function and I don’t know how to/ don’t remember how do this! How would I find and write the equation for it?

An answer is
[tex]\displaystyle f\left(x\right)=\frac{\left(x+1\right)^3}{\left(x+2\right)^2\left(x-1\right)}[/tex]
Explanation:
Template:
[tex]\displaystyle f(x) = a \cdot \frac{(\cdots) \cdots (\cdots)}{( \cdots )\cdots( \cdots )}[/tex]
There is a nonzero horizontal asymptote which is the line y = 1. This means two things: (1) the numerator and degree of the rational function have the same degree, and (2) the ratio of the leading coefficients for the numerator and denominator is 1.
The only x-intercept is at x = -1, and around that x-intercept it looks like a cubic graph, a transformed graph of [tex]y = x^3[/tex]; that is, the zero looks like it has a multiplicty of 3. So we should probably put [tex](x+1)^3[/tex] in the numerator.
We want the constant to be a = 1 because the ratio of the leading coefficients for the numerator and denominator is 1. If a was different than 1, then the horizontal asymptote would not be y = 1.
So right now, the function should look something like
[tex]\displaystyle f(x) = \frac{(x+1)^3}{( \cdots )\cdots( \cdots )}.[/tex]
Observe that there are vertical asymptotes at x = -2 and x = 1. So we need the factors [tex](x+2)(x-1)[/tex] in the denominator. But clearly those two alone is just a degree-2 polynomial.
We want the numerator and denominator to have the same degree. Our numerator already has degree 3; we would therefore want to put an exponent of 2 on one of those factors so that the degree of the denominator is also 3.
A look at how the function behaves near the vertical asympotes gives us a clue.
Observe for x = -2,
Observe for x = 1,
We should probably put the exponent of 2 on the [tex](x+2)[/tex] factor. This should help preserve the function's sign to the left and right of x = -2 since squaring any real number always results in a positive result.
So now the function looks something like
[tex]\displaystyle f(x) = \frac{(x+1)^3}{(x+2 )^2(x-1)}.[/tex]
If you look at the graph, we see that [tex]f(-3) = 2[/tex]. Sure enough
[tex]\displaystyle f(-3) = \frac{(-3+1)^3}{(-3+2 )^2(-3-1)} = \frac{-8}{(1)(-4)} = 2.[/tex]
And checking the y-intercept, f(0),
[tex]\displaystyle f(0) = \frac{(0+1)^3}{(0+2 )^2(0-1)} = \frac{1}{4(-1)} = -1/4 = -0.25.[/tex]
and checking one more point, f(2),
[tex]\displaystyle f(2) = \frac{(2+1)^3}{(2+2 )^2(2-1)} = \frac{27}{(16)(1)} \approx 1.7[/tex]
So this function does seem to match up with the graph. You could try more test points to verify.
======
If you're extra paranoid, you can test the general sign of the graph. That is, evaluate f at one point inside each of the key intervals; it should match up with where the graph is. The intervals are divided up by the factors:
So we need to see if -2 < x < -1 matches up with the graph. We can pick -1.5 as the test point, then
[tex]\displaystyle f(-1.5) = \frac{\left(-1.5+1\right)^3}{\left(-1.5+2\right)^2\left(-1.5-1\right)} = \frac{(-0.5)^3}{(0.5)^2(-2.5)} \\= (-0.5)^3 \cdot \frac{1}{(0.5)^2} \cdot \frac{1}{-2.5}[/tex]
We don't care about the exact value, just the sign of the result.
Since [tex](-0.5)^3[/tex] is negative, [tex](0.5)^2[/tex] is positive, and [tex](-2.5)[/tex] is negative, we really have a negative times a positive times a negative. Doing the first two multiplications first, (-) * (+) = (-) so we are left with a negative times a negative, which is positive. Therefore, f(-1.5) is positive.