In my textbook the following definition were presented
However, it was presented previously that 
Thus if we were to minimise the sum of squared residuals, shouldn't we be minimising $Q=\sum_{i=1}^n(y_i-\hat{y})^2=\sum_{i=1}^n(y_i-\hat{\beta_0}-\hat{\beta_1}x_i)^2$?

You may understand in this way that $\beta_0$ and $\beta_1$, they denote a solution of $Q$, while $\hat{\beta}_0$ and $\hat{\beta}_1$, they are an optimal solution for the minimization problem $Q$.