The first step here is to approximate the function \( y \) with a first-order polynomial, that is we write
$$ y=y(x) \rightarrow y(x_i) \approx \theta_0+\theta_1 x_i. $$By computing the derivatives of \( \chi^2 \) with respect to \( \theta_0 \) and \( \theta_1 \) show that these are given by
$$ \frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_0} = -2\left[ \frac{1}{n}\sum_{i=0}^{n-1}\left(\frac{y_i-\theta_0-\theta_1x_{i}}{\sigma_i^2}\right)\right]=0, $$and
$$ \frac{\partial \chi^2(\boldsymbol{\theta})}{\partial \theta_1} = -\frac{2}{n}\left[ \sum_{i=0}^{n-1}x_i\left(\frac{y_i-\theta_0-\theta_1x_{i}}{\sigma_i^2}\right)\right]=0. $$