I will do the part with all three points and you can do the other with two points.
We are given that $f(x) = e^{2x} - x$, $x_0 = 1$, $x_1 = 1.25$, and $x_2 = 1.6$.
We are asked to construct the interpolation polynomial of degree at most two to approximate $f(1.4)$, and find an error bound for the approximation.
You stated that you know how to find the interpolating polynomial, so we get:
$$P_2(x) = 26.8534 x^2-42.2465 x+21.7821$$
The formula for the error bound is given by:
$$E_n(x) = {f^{n+1}(\xi(x)) \over (n+1)!} \times (x-x_0)(x-x_1)...(x-x_n)$$
Since we do not know where $\xi(x)$ is, we will find each error over the range and multiply those together, so we have:
$$\max_{(x, 1, 1.6)} |f'''(x)| = \max_{(x, 1, 1.6)} 8 e^{2 x} = 196.26$$
Next, we need to find:
$$\max_{(x, 1, 1.6)} |(x-1)(x-1.25)(x-1.6)| = 0.00754624$$
Thus we have an error bound of:
$$E_2(x) = \dfrac{196.26}{6} \times 0.00754624 \le 0.246838$$
If we compute the actual error, we have:
$$\mbox{Actual Error}~ = |f(1.4) - P_2(1.4)| = |15.0446 - 15.2698| = 0.2252$$
Note that $\ell$ by itself does not interporate your points $f(x_i)$. It is just a stepping stone in developing a later expression for the actual interpolation.
$\ell(x)$ is just the monic (i.e., leading coefficient = 1) polynomial having simple zeros at each of the interpolation points $x_i$ and no other zeros.
For fixed $j$, by removing the $(x - x_j)$ factor from $\ell$, we get another polynomial with simple zeros at all the other interpolation points, but which is non-zero for $x_j$. Call it $$L_j(x) = (x - x_0)...(x- x_{j-1})(x-x_{j+1})...(x-x_n) = \frac {\ell(x)}{x - x_j}$$
But this isn't quite useful enough. We'd like to have $\ell_j(x_j) = 1$ as well. But that is simply a matter of dividing by the right constant:
$$\ell_j(x) = \frac {L_j(x)}{L_j(x_j)}$$
You may note that $x = x_j$ is the one point where the equation $$L_j(x) = \frac {\ell(x)}{x - x_j}$$ does not hold, since the right-hand side is undefined there. However, $L_j(x_j)$ itself is defined. It is just $$L_j(x_j) = (x_j - x_0)...(x_j- x_{j-1})(x_j-x_{j+1})...(x_j-x_n)$$
To make the notation a little easier, we rename $$w_j = \frac 1{L_j(x_j)}$$, giving the expression in your post. I'll leave proving that $L_j(x_j) = \ell'(x_j)$ to you.
The point of all of this is that now we have a set of polynomials with the property that $$\ell_j(x_i) = \begin{cases} 1 & i = j\\0 & i \ne j\end{cases}$$ and are the simplest such polynomials possible. And therefore we can take $$P(x) = \sum_{i=0}^n f(x_i)\ell_i(x)$$
Best Answer
Well, $$ p(x) = \frac{4}{\pi^2}x(\pi-x) $$ is obviously the only second degree polynomial with roots at $x=0,\,x=\pi$ that equals $1$ at $x=\frac{\pi}{2}$, and while $p\!\left(\frac{\pi}{4}\right)=\frac{3}{4}$, $\sin\left(\frac{\pi}{4}\right)=\frac{1}{\sqrt{2}}$, hence the error of the approximation at $x=\frac{\pi}{4}$ is $$ \left|\frac{3}{4}-\frac{1}{\sqrt{2}}\right|=\frac{1}{4(3+\sqrt{8})}\approx\color{red}{\frac{1}{23}}.$$