CMIMC 2021 Algebra and Number Theory Problem 3

Let a and b be complex numbers such that (a+1)(b+1)=2 and \left(a^{2}+1\right)\left(b^{2}+1\right)=32. Compute the sum of all possible values of \left(a^{4}+1\right)\left(b^{4}+1\right).