We are given the following expression:
[tex]xy+qr-xr-qy[/tex]We will associate the terms that have common factors, like this:
[tex](xy-xr)+(qr-qy)[/tex]Now we take the common factor for each of the parenthesis:
[tex]x(y-r)+q(r-y)[/tex]Since each parenthesis has a common factor but with inverted signs, we will take -1 as a common factor in the second parenthesis, we get:
[tex]x(y-r)-q(y-r)[/tex]Now we can take "y-r" as a common factor for the entire expression:
[tex](y-r)(x-q)[/tex]And thus we have factored the expression.