(solved by Axel Hovasse)
Let a,b∈N such that ab+2=a3+2b. Thus a3−2=b(a−2). Therefore, a=2, because 23−2=0. Thus a−2∣a3−2, but a−2∣(a−2)3=a3−6a2+12a−8, it follows that a−2∣−6a2+12a−6. However, a−2∣6a(a−2), so a−2∣6. Thus a−2∈{−6,−3,−2,−1,1,2,3,6}, which means a∈{−4,−1,0,1,3,4,5,8}, but a⩾0, so a∈{0,1,3,4,5,8}. We then find (a,b)∈{(0,1),(1,1),(3,25),(4,31),(5,41),(8,85)}. We verify subsequently that these pairs are indeed solutions.