10 xy + 14 x + 15 y = 166, find x + y, for (x, y), positive intergers.
Let x+y = k, for some positive integer k.
y=k-x.
Substitute for y = k-x into the original expression.
10x(k-x) + 14x + 15(k-x) = 166
10kx - 10x^2 + 14x + 15k - 15x = 166
-10x^2 + (10k-1)x = 166 - 15k
10x^2 - (10k-1)x = 15k - 166
Now multiply everything by 4 times coefficient of x^2, then complete the square.
400x^2 - 40(10k-1) + (10k-1)^2 = 600k - 6640 + (10k-1)^2
(20x - (10k-1))^2 = 600k - 6640 + 100k^2 - 20k + 1
(20x - (10k-1))^2 = 100k^2 +580k - 6639
(20x - (10k-1))^2 = (10k + 29)^2 - 7480
lhs is a square and so >= 0. Hence so also is rhs. Thus,
(10k + 29)^2 >= 7480 (= 86.5^2, approx)
10k + 29 >=87
10k >= 58
k >= 6
We now test values of k, for k>=6, such that rhs is a perfect square. Then solve lhs for x, such that x is an integer.
Putting k = 6, (10k + 29)^2 - 7480 = 441 = 21^2
Hence, 20x - (10k-1) = 21 (with k = 6)
20x - 59 = 21
20x = 80
x = 4
y = 2
The solution pair is: (x,y) = (4,2)