Maximum cut using a 1/2 approximation greedy algorithm
Let us say that an edge $(v,w)$ belongs to $v$ if when $v$ is processed, $w \in A \cup B$, and that $(v_1,v_2)$ belongs to $v_2$. Denote by $N_v$ the number of edges belonging to $v$, and by $C_v$ the number of those edges that are cut by the algorithm. Step 2 ensures that $C_v \geq N_v/2$ (this clearly holds for $v = v_2$ as well). Therefore $\sum_v C_v \geq \sum_v N_v/2$. Finally, notice that $\sum_v N_v$ is the number of edges in the graph, and $\sum_v C_v$ is the size of the cut produced by the algorithm.

Here is a sketch of another proof. At any point in time, define the score of an edge $(u,v)$ as follows:


If $u,v \in A$ or $u,v \in B$, the score is 0.
If $u \in A$ and $v \in B$ or vice versa, the score is 1.
Otherwise the score is 1/2.


You can check that the initial score is at least half the number of edges, the score never decreases, and the final score is number of edges cut by the algorithm.