Because we are looking for a vector perpendicular to $\langle a,b\rangle$, we include $\langle a,b,0 \rangle$ as one of the vectors of the cross product.
Because we are looking for a vector that is in the 2d plane, we want to make sure the vector is perpendicular to $\langle 0,0,1\rangle$.
Thus, our candidate vector is $ \langle a, b, 0\rangle \times \langle 0, 0, 1\rangle $.
We now check whether this vector is 90 degrees clockwise or counterclockwise from $\langle 1, 2 \rangle$.
The right hand rule tells us that the cross product $ \langle a, b, 0\rangle \times \langle 0, 0, 1\rangle $ is in the clockwise direction from $\langle a,b\rangle$.
To get the vector in the counterclockwise direction we take the cross product with $\langle 0, 0, -1 \rangle$ instead.