How do you do least square error problems. Here is an example, can someone walk me through this

First find the formula (of the type in the text's Practice Problem 1) that gives the least-squares error for the points

(3, 9), (7, 5), and (8, 2). Then find the partial derivatives and