factoring out a variable and using zero product property to solve