The forums support LaTeX as described on the DLS FAQ Thread. Using your formulas with the local syntax for LaTeX for clarity gives:
difference = \frac {\mid\mid grad - gradapprox \mid\mid_2}{\mid\mid grad \mid\mid_2 + \mid\mid gradapprox \mid\mid_2} \tag{2}
Versus
\frac{|| dtheta - dthetaapprox ||_2}{ || dtheta||_2 - || dthetaapprox||_2}
The second formula with the subtraction in the denominator is incorrect. The course notes are not really maintained, but I will report that as a bug.
The first formula is correct and that is what is shown in the assignment. The order does not matter because addition is commutative and in the case of the numerator, we are taking the norm of the difference so it wouldn’t matter there if you reversed the operands.
The subscript 2 means that the norms are the “2-norm” which is the Euclidean distance.