logarithmic function between two points

I need to find the logarithmic curve between two points

$A(0,5),\phantom{\rule{1em}{0ex}}B(180,9)$

We know that the formula for logarithmic function is: $\phantom{\rule{thickmathspace}{0ex}}f(x)=\mathrm{log}(x)\phantom{\rule{thinmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}$ so

$5=\mathrm{log}(0),\phantom{\rule{1em}{0ex}}9=\mathrm{log}(180)$

But that's impossible because $\mathrm{log}(0)$ is undefined. What Did I do wrong?

Following the below advice I'm still stuck

${a}^{5}=0-b$ and ${a}^{9}=180-b$

then

${a}^{9}=180+{a}^{5}$

${a}^{4}=180$

$a=3.66$

Now let's plug a in our original formula

${3.66}^{5}=-b$

$b=-656.7$

$f(x)=\mathrm{log}3.66(x+656.7)$

I did a little bit of fiddling with a graph and at the end of the day what I was looking for was

$f(x)=\mathrm{log}1.77(x-5)$

I would be awesome to understand how to achieve this result without playing randomly with excel.