Determine the Number of Transistors Needed to Build CMOS circuit
The above problem can be solved by using TG 
We have 3 inputs now for sake of less number of MOS to be used lets get \$x_1 x_2 x_3\$ in true logic as well as inverted logic 

So MOS needed for 3 inverters is   \$ 3 \times 2 = 6\$

now all we need are 3 TG to be implemented NOTE: since we already have inverted logic form of \$x_1 x_2 x_3\$ we don't need inverters again
Thus to implement 3 TG we need \$ 3 \times 2 = 6\$ MOS

Thus total \$ 6 +\ 6=12 \$ MOS needed