For the following exercise, use the graph to write an equation for the function. (Please write in expanded form and factored form)

We are asked to determine a function that has two vertical asymptotes at:
[tex]\begin{gathered} x=-3 \\ x=4 \end{gathered}[/tex]And an x-intercept at:
[tex]x=3[/tex]And a y-intercept at:
[tex]y=-2[/tex]This means that the function must have the following form:
[tex]f(x)=\frac{k(x-x_0)}{(x-a)(x-b)}[/tex]Where:
[tex]\begin{gathered} a,b=\text{ vertical asymptotes} \\ x_0=\text{ x-intercept} \\ k=\text{ constant} \end{gathered}[/tex]Now, we substitute the known values:
[tex]f(x)=\frac{k(x-3)}{(x+3)(x-4)}[/tex]Now, we determine the value of "k" using the y-intercept, since this means that when "x = 0", then "y = -2". Substituting we get:
[tex]-2=\frac{k(0-3)}{(0+3)(0-4)}[/tex]Solving the operations:
[tex]-2=\frac{-3k}{(3)(-4)}[/tex]Simplifying:
[tex]-2=\frac{-k}{-4}[/tex]Now, we multiply both sides by -4:
[tex]8=-k[/tex]Now, we multiply both sides by -1:
[tex]-8=k[/tex]Substituting in the function we get:
[tex]f(x)=\frac{-8(x-3)}{(x+3)(x-4)}[/tex]And thus we get the function we were looking for in the factored form.
Now, to determine the expanded form we use the distributive property on the denominator, we get:
[tex]f(x)=\frac{-8(x-3)}{x^2-4x+3x-12}[/tex]Adding like terms:
[tex]f(x)=\frac{-8(x-3)}{x^2-x-12}[/tex]Now, we apply the distributive property on the numerator:
[tex]f(x)=\frac{-8x+24}{x^2-x-12}[/tex]And thus we get the expanded form.