I am having trouble with understanding log.

I don't know what to do when it says log x=3 or when it has log with a little 5 x=2

Start here.

http://en.wikipedia.org/wiki/Logarithm