It is an easy guess. Apply the method of trial and error. Put a = 0 and you get b = 0. Put a = 2 and you get b = 2. So the solution set is { (0,0) , (2,2) }. But is this method most correct ? Should we use trial and error for such questions ? I will suggest you not to use trial and error.
Approach : We should try to factorize the given expression.ab = a + b
ab - b = a
b (a - 1) = a
b (a - 1) = (a - 1) + 1
(a - 1) (b - 1) = 1
Since a is an integer, then (a - 1) must also be an integer, same is true for (b - 1). This implies that (a - 1) and (b - 1) must be factors of 1 ( including negative numbers ). There are 2 ways we can get 1 i.e. either by 1 * 1 = 1 or (-1) * (-1) = 1, which implies that either (a - 1) and (b - 1) are both 1 or both -1. Thus we have solved the given equation.