ab + a + b = 322 ---> ab + b + a = 322 ---> b(a + 1) + a = 322 ---> b = (322 - a)/(a + 1)
---> if a = 16, b = 18; if a = 18, b = 16
bc + b + c = 398 ---> b(c + 1) + c = 398 ---> b = (398 - c)/(c + 1)
---> if c = 6, b = 56; if c = 56, b = 6; if c = 18, b = 20; if c = 20, b = 18
Since b can be 18 in both cases, let a = 16, b = 18, and c = 20 ---> which means that d = 7
I got these pairs of values by placing y1 = (322 - x)/(x + 1) and y2 = (398 - x)/(x + 1)
into my calculator and scrolling down the table of values.