Cost function in linear regression
$h_\theta$ implies that you're trying to model the relation between $h$ and $x$ with an straight line coming from the origin $(0,0)$. The parementer $\theta_1$ is the slope of this line.

Evaluating $J(\theta_1=0) = J(0)$, implies that $h_\theta(x_i)=0$ whatever the value of $x_i$ is. Since $m=3$, and the labels are $y_1=1, y_2=2, y_3=3$

$J(0) = \frac{1}{6}[(0 -1)^2 + (0 - 2)^2 + (0-3)^2] = \frac{14}{6}$

The value of $\theta_1$ for which $J(\theta_1) = 0$ is obviously 1