TeX source:
g(x)=\left\{\begin{aligned} x & \text { if } x \neq 2 \\ 3 & \text { if } x=2 \end{aligned}\right.