Question: How can I simplify this logarithmic expression?

I am trying to calculate log[1/3](x)-log[sqrt(3)](x^2)+log[x](9) with log[3](x) = a.
I tried:

restart;
sol := solve(log[3](x) = a, x);
f :=x->log[1/3](x)-log[sqrt(3)](x^2)+log[x](9) ;
simplify(f(sol))


I don't get the answer (2-5a^2)/a.

How can I get that answer?

Please Wait...