In this question it is given that majrority of variable takes "1" as an input so,
f(x,y,z) = 011 = 3 , 101 = 5 , 110 = 6 , 111 = 7 (i.e no. of "1 " is either 2 or 3)
now out put of MUX will be : x' p + x q
therefore from above function output we coclude that P = YZ and Q = Y' Z + Y Z' + YZ
and after simplifying "Q" we get "Q = Y + Z "
so , P = AND GATE (Y Z)
and Q = OR GATE (Y +Z)