4-terminal MOSFET in this CMOS circuit
The 4 terminal MOSFET is a symmetrical device. Drain and source are interchangeable. For a 3-terminal MOSFET the source is the one that's connected to the body.

What you have here is called a transmission gate. Notice that the top MOSFET is a PMOS while the bottom is an NMOS, so they will both be 'on' at the same time (when \$\bar{A}\$).