This question was asked in Ex 2.2,3

Factor theorem

Khush 2303's image