Given the number sets $A=\left\{a+2,(a+1)^{2}, a^{2}+3 a+3\right\}, B=\{a+b, 1, a-$ $b+5\}$. If $A=B$, find the values of the real numbers $a, b$.
Two sets are equal if and only if they have exactly the same elements. According to the uniqueness and unordered nature of the elements in a set, set $A$ has three elements, one and only one of which is 1. Based on this, we can solve for $a$, and then for $b$.

Solution: From $A=B$, we get $1 \in A \cdot a+2=1 \Rightarrow a=-1 ;(a+1)^{2}=1 \Rightarrow a=0$ or $a=-2 ; a^{2}+3a+3=1 \Rightarrow a=-1$ or $a=-2$. Given that set $A$ has three elements, one and only one of which is 1, we get $a=0, A=\{1,2,3\}, B=\{1, b, 5-b\}$. From $A=B$, we get $b=2$ or $b=3$. Therefore, the required real numbers are $a=0, b=2$ or $a=0, b=3$.