It is:
$$f[\alpha,\beta,\gamma]=\frac{f[\alpha,\beta]-f[\beta,\gamma]}{\alpha-\gamma}$$
Indeed, it works like that for $n$ points as well.
As for the number $2$,
$$P(x)=f(0) \times L_0(x) + f(1) \times L_1(x)+ f(3) \times L_2(x)=f(1) \times L_1(x)+ f(3) \times L_2(x) $$
Where:
$$L_j(x)=\frac{(x-x_0)(x-x_1) \dots (x-x_{j-1})(x-x_{j+1}) \dots (x-x_n)}{(x_j-x_0)(x_j-x_1) \dots (x_j-x_{j-1})(x_j-x_{j+1}) \dots (x_j-x_n)}$$
And $n=2$ (the number of points). Therefore:
$$L_0(x)=\frac{(x-x_1)(x-x_2)}{(x_j-x_1)(x_j-x_2)}=\frac{(x-1)(x-3)}{(0-1)(0-3)}=\frac{(x-1)(x-3)}{3}$$
(Actually, you don't need to calculate $L_0$)
$$L_1(x)=\frac{(x-x_0)(x-x_2)}{(x_j-x_0)(x_j-x_2)}=\frac{(x-0)(x-3)}{(1-0)(1-3)}=$$
$$L_2(x)=\frac{(x-x_0)(x-x_1)}{(x_j-x_0)(x_j-x_1)}=\frac{(x-0)(x-1)}{(3-0)(3-1)}=\frac{x(x-1)}{6}$$
Finally, we have:
$$P(x)=f(1) \times L_1(x)+ f(3) \times L_2(x)= 2 \times \frac{x(x-3)}{-2} + 3 \times \frac{x(x-1)}{6}=\frac{x(x-1)}{2} -x(x-3)$$
$$P(x)=\frac{-x^2+5x}{2}$$