Finding Equations of LSRL: Old School

Study the table in the spreadsheet. Solving the system of equations (in row 7) for m and b is how they used to find the equations of least square regression lines. Why does this work?