You can compute the slope given that you have two points
and
.

Your function has a form of,

So we also need to find n. To do that, substitute y and x for some point we already know, I will pick point
then solve for n,




So the function is,

Hope this helps :)