It is best to first establish the well known limit $$\lim_{x\to 0}\frac{\tan x-x} {x^3}=\frac{1}{3}\tag{1}$$ This is easily done via the application of L'Hospital's Rule or Taylor series expansions.
The exponent $12$ is used here to intimidate students and one just needs to replace it with a generic symbol $n$. Next we note that for any positive integer $n$ we have $$f(n) =\lim_{x\to 0}\frac{\tan^n x-x^n} {x^{n+2}}=\lim_{x\to 0}\frac{\tan x-x} {x^3}\cdot\sum_{i=1}^{n}\frac{\tan^{i-1}x}{x^{i-1}} =\frac{n}{3}$$ The limit in question is $f(12)=4$.
Thus if one wishes to use L'Hospital's Rule then just a single application of the rule is fine. But one must always use a certain amount of algebraic manipulation before applying the rule.
In case $n$ is not a positive integer then it is best to make use of another standard limit $$\lim_{x\to a} \frac{x^n-a^n} {x-a} =na^{n-1}\tag{2}$$ along with limit $(1)$. Thus we have $$f(n) =\lim_{x\to 0}\frac{\tan^n x-x^n} {x^{n+2}}=\lim_{x\to 0}\dfrac{\left(\dfrac{\tan x} {x} \right) ^n-1}{\dfrac{\tan x} {x} - 1}\cdot\dfrac{\dfrac{\tan x} {x} - 1}{x^2}\\=\lim_{t\to 1}\frac{t^n-1}{t-1}\cdot\lim_{x\to 0}\frac{\tan x-x} {x^3}=\frac{n}{3}$$ Here we have used the substitution $t=(\tan x) /x$ so that $t\to 1$ as $x\to 0$.