No, your first equation is incorrect. Your first step actually only holds true if
x→0limx3tan(x)<∞and
x→0limx3sin(x)<∞The problem is, the neither are true so your solution is invalid (which is why you've got the wrong answer). What you've done is turned it into an indeterminate
∞−∞ form, which does not necessarily go to 0.
You should have, from algebra of limits, that if:
f(x)→A,
g(x)→B as
x→p then
x→plim(αf(x)+βg(x))=αx→plimf(x)+βx→plimg(x)=αA+βB where
α,β∈C but, more importantly,
A,B are finite (and the converse of this does not hold)
Just to reassure you that algebra of limits doesn't work like this, a good counterexample is to look the following
x→0limx(1+x)−1Well, we can easily work this out directly as we have
x→0limx(1+x)−1=x→0lim(x1+x−x1)=x→0lim(xx)=1However, if we do what you have done, we get this:
x→0limx(1+x)−1=x→0lim(x1+x−x1)=x→0lim(x1−x1)=0Which essentially comes down to saying you can't take the limit of one part before others.