My data are:
x 2.2 2.6 3.4 4.0
y 65 61 54 50
If I take the logarithm of the given equation, I will get $$\ln y = \ln a + bx$$
How should I use my data from here? Would it be alright if I just plug in the first two sets of x, y values which will give me:
$$\ln 65 = \ln a + 2.2b$$ $$\ln 61 = \ln a + 2.6b$$
and solve these two equations for a and b? How will the method of least squares come into play?
You have $n$ data points $(x_i,y_i)$ and the model is $$y=a\,e^{bx}$$ which is nonlinear because of $b$; because of that, you need estimates of the parameters.
Fortunately, in a first step, you can approximate the model by linearization taking logarithms $$\log(y)= \log(a)+ b x= c+b x$$ So, because of the above, for each data point, define $z_i=\log(y_i)$ and you have the linear model $$z= c+b x$$ and you just need the most basic linear regression which will give you $c$ and $b$ and from $c$, $a=e^c$ but these are estimates only of the true parameters.
However, this is not sufficient and you need later to apply nonlinear regression since what has been measured is $y$ and not any of its possible transforms.