Design a combinational circuit with two inputs and four outputs. The output binary number should be the square of the input binary number
Can someone please explain how this output expression was dervied from
  the truth table?


I don't know how it was derived, but for a simple case like this I would just look at each line and see what logical combination of inputs create each output:-


S0 is always the same as B, so S0 = B 
S1 is always 0, so S1 = 0 
S2 is 1 only when A is 1 and B is 0, so S2 = AB' 
etc.