I guess i figured out the solution.
i got it from careful observation of mux table. for a and b = 0/1 the output of mux is a.b i.e carry output of half adder.
for other values of a and b the output is (a xnor b). So i think if we take half adder
the input to xor gate are b and s and then...