For this problem I found online
(1) Where does equation 1 come from? I don't understand why there's only $x_1$, $x_2$ and $x_3$ in the matrix? And why are their positions in the middle of the matrix?
(2) How is equation 1 converted to equation 2?
Copyright © 2021 JogjaFile Inc.
Note: this answer is incomplete. Hopefully it clears up some things for the OP nevertheless. It should not be accepted in its current state.
In other words, the first thing to understand about equation 1 is that there is a typo in its definition.
I.e., we add $1/4 \cdot F''$ ($1/4$ times the approximation to $f''$) to $1/4$ times the equation describing the approximation to $xf(x)$, to get $1/4$ times the approximation to $f'' + xf(x)$.
Note that $(\Delta x)^{-2} = 4$, which is why everything is being multiplied by $1/4$, to simplify the expression somewhat. And since $(1/4) \cdot 0 = 0$, it doesn't affect the end result.
Also, there may be another typo on the page -- at the top of the page, it is written $N = 4$ (upper-case $N$), but later on the page it is written $n = 4$ (lower-case $n$) -- I suspect they are meant to denote the same quantity, even though they are represented by different symbols.
The reason why (I think) the matrices which are being multiplied with $F$ from the left are $3 \times 5$ is because of the description of the problem, where we are only supposed to find the values of the approximations at interior points. The boundary points are $x_0$ and $x_4$, so the interior points are $x_1, x_2, x_3$ -- note that there are only three interior points, and that multiplying the matrices in question on the left of $F$ leads to a $3 \times 1$ vector. Also the only points which occur in the left matrix of equation 1 are $x_1, x_2, x_3$, which are the interior points, which again corresponds to/matches the problem description.