Simplifying CMOS schematic to reduce number of transistors
3rd one doesn't work as XOR.

Look at case A=0, B=0:
Upper right MOSFET (p-channel) is turned ON. This yields 1 at the output which is wrong.

Also look at case A=0, B=1:
Upper left MOSFET (p-channel) is turned ON, which makes source of lower right MOSFET (n-channel) high.
Gate of lower right MOSFET (n-channel) is high but its source is also high.
N-channel MOSFET is, however, supposed to be used only as switch to low. 

And to answer your question "How do you simplify a CMOS circuit?":


be creative and check that your circuit yields correct output value in all cases (i.e. here in all 4 cases: A=0, B=0 &rarr; 0; &nbsp; A=1, B=0 &rarr; 1; &nbsp; A=0, B=1 &rarr; 1; &nbsp; A=1, B=1 &rarr; 0).
N-channel transistors (the ones without bubble at the gate) are turned ON by "1" at gate. Use them only as switch to "0".
P-channel transistors (the ones with bubble at the gate) are turned ON by "0". Use them only as switch to "1".