Ket $f(x) = x^{2} +ax + b$. If for all nonzero real $x$

$$f\left(x + \dfrac{1}{x}\right) = f\left(x\right) + f\left(\dfrac{1}{x}\right)$$

and the roots of $f(x) = 0$ are integers, what is the value of $a^{2}+b^{2}$?
1. Given the function \( f(x) = x^2 + ax + b \), we need to satisfy the condition:
   \[
   f\left(x + \frac{1}{x}\right) = f(x) + f\left(\frac{1}{x}\right)
   \]
   for all nonzero real \( x \).

2. First, we compute \( f\left(x + \frac{1}{x}\right) \):
   \[
   f\left(x + \frac{1}{x}\right) = \left(x + \frac{1}{x}\right)^2 + a\left(x + \frac{1}{x}\right) + b
   \]
   Expanding the square term:
   \[
   \left(x + \frac{1}{x}\right)^2 = x^2 + 2 + \frac{1}{x^2}
   \]
   Therefore:
   \[
   f\left(x + \frac{1}{x}\right) = x^2 + 2 + \frac{1}{x^2} + a\left(x + \frac{1}{x}\right) + b = x^2 + \frac{1}{x^2} + ax + \frac{a}{x} + b + 2
   \]

3. Next, we compute \( f(x) + f\left(\frac{1}{x}\right) \):
   \[
   f(x) = x^2 + ax + b
   \]
   \[
   f\left(\frac{1}{x}\right) = \left(\frac{1}{x}\right)^2 + a\left(\frac{1}{x}\right) + b = \frac{1}{x^2} + \frac{a}{x} + b
   \]
   Adding these two expressions:
   \[
   f(x) + f\left(\frac{1}{x}\right) = x^2 + ax + b + \frac{1}{x^2} + \frac{a}{x} + b = x^2 + \frac{1}{x^2} + ax + \frac{a}{x} + 2b
   \]

4. Equating the two expressions from steps 2 and 3:
   \[
   x^2 + \frac{1}{x^2} + ax + \frac{a}{x} + b + 2 = x^2 + \frac{1}{x^2} + ax + \frac{a}{x} + 2b
   \]
   Simplifying, we get:
   \[
   b + 2 = 2b
   \]
   Solving for \( b \):
   \[
   b = 2
   \]

5. Now, we know that \( b = 2 \). The quadratic equation \( f(x) = 0 \) becomes:
   \[
   x^2 + ax + 2 = 0
   \]
   Since the roots are integers, let the roots be \( p \) and \( q \). By Vieta's formulas:
   \[
   p + q = -a \quad \text{and} \quad pq = 2
   \]
   The pairs of integers \( (p, q) \) that satisfy \( pq = 2 \) are \( (1, 2) \) and \( (-1, -2) \).

6. For \( (p, q) = (1, 2) \):
   \[
   p + q = 1 + 2 = 3 \quad \Rightarrow \quad a = -3
   \]

7. For \( (p, q) = (-1, -2) \):
   \[
   p + q = -1 + (-2) = -3 \quad \Rightarrow \quad a = 3
   \]

8. We need to find \( a^2 + b^2 \):
   \[
   a^2 + b^2 = (-3)^2 + 2^2 = 9 + 4 = 13
   \]
   or
   \[
   a^2 + b^2 = 3^2 + 2^2 = 9 + 4 = 13
   \]

The final answer is \( \boxed{13} \).