How do I solve this question?

If x and y are both postive integers greater than 1 and x+xy+y=20 what does x+y equal?

  1. 4
  2. 6
  3. 8
  4. 10
  5. 12
    Didn’t quite get how to do this question and the gregmat explanation didnt help much either.

If you add 1 to both sides then you should have x + xy + y + 1 = x(y + 1) + (y + 1) = 21, which upon group factorizing leads to (x + 1)(y + 1) = 21

I don’t know Greg’s method so I hope my method isn’t the same.

My first instinct was to see if I could brute force the problem space quickly. Notice that the variables are integers and the equation has symmetry (i.e x & y can be exchanged).
Therefore I can fix x \leq y then make two cases: x = minimum val, x = y. Now for two cases: x = 2 returns a valid set {x, y} = {2, 6} so we should be done but in any case. For the second case where x = y we get x^2 + 2x = 20 . It’s easy to spot that x can’t be too large. Even x = 4 gives us x^2 + 2x = 24 which is > 20. You can try for 3 and that won’t return a valid solution anyway.
Hence, answer should be 3. 8

EDIT: Can someone tell me why my LaTex isn’t working ?
EDIT2: Fixed