This question was asked in Ex 2.4,5

Second method solve please

SHAFIQ AHMAD's image