Suppose A=a^2+b+a; B=ab^2+b+7
Now if B divides A then it also divides bA-aB.
We are hence looking for those pairs (a,b) for which B divides bA-aB=b^2-7a
Since a

1 we have b^2 <=ab^2
Therefore b^2-7a<ab^2+b+7=B
Let b^2-7a>=0 first , then B is dividing a non--ve integer smaller than B itself and thus the later b^2-7a=0
then b^2=7a
Thus b is a multiple of 7 can be written as b=7c
Hence 4ac^2-7a=0 and a=7c^2
where c is a +ve integer.
These pairs (a,b)=(7c^2,7c) already satisfy the conditions since
A=49c^4.7c+7c^2+7c
= 7c(49c^4+c+1)
B=7c^2.49c^2+7c+7
=7(49c^4+c+1)
i.e. A=cB
Assume that b^-7a<0; its opposite the +ve integers 7a-b^2<7a is divisible by B. b now cannot exceed 2 otherwise B=ab^2+b+7>=9a+10
Thus B can not divide a +ve number less than 7a.
Hence b=1 or b=2
If b=1,then 7a-b^2=7a-1
If this is a multiple of B=a+8
then 7a-1=7(a+8)-57 shows that B has to divide 57.
thus a =11 or 49
For b=2 we get no soln.
The sols are the pairs (7c^2,7c) and the two extras :(11,1) and (49,1).
THANKS
IF U FIND IT USEFUL THEN RATE ME> TC
SHITIJ..