How do you solve the equation 3x + y = 6 for x?

The solution is $x = \frac{6 - y}{3}$ or $x = 2 - \frac{y}{3}$.
When solving such eqations you treat other unknowns (in this case $y$ as it was a constant). You move it to right side of the equation. So the full solution is:
$3 x + y = 6$ You substract $y$ from both sides
$3 x = 6 - y$ You divide both sides by 3
$x = \frac{6 - y}{3}$
$x = 2 - \frac{y}{3}$