This question was asked in Ex 5.1 ,6

I think there are some typing errors in the answer specially in the case 2 part

Mehak Singhal's image