We have:
sin^2(theta) + 3cos^2(theta)=4
which really is just:
sin^2(theta)+cos^2(theta) + 2cos^2(theta)=4
and using the identity sin^2(x) + cos^2(x)=1 for all x, we get:
1+2cos^2(theta)=4 (eq.A)
We carry on and simplify eq.A until we get an expression for cos(theta):
2cos^2(theta)=3
cos^2(theta)=3/2
cos(theta)=+-sqrt(3/2)
We also notice that cos^2(theta) =1-sin^2(theta), so (eq.A) becomes:
1+2cos^2(theta)=1+2(1-sin^2(theta))=4
i.e.
3-2sin^2(theta)=4
i.e.
sin^2(theta)=-1/2
sin(theta)= +- sqrt(1/2) (it should really be 'minus-plus' instead but the symbol does not exist here in Socratic).
So, now it is simply a matter of plugging these in the tan function:
tan(theta)=sin(theta)/cos(theta)
=(+- sqrt(1/2))/(+- sqrt(3/2))
=+-(1/sqrt(3))
=+-(sqrt 3)/3 (it is more conventional to write it like this without the square-root in the denominator).