3. Given that $a$ and $b$ are constants, the solution sets of the inequalities
$$
a x+1>x+b \text { and } 3(x-1)<a-b x
$$

are the same. Then
$$
(a+1)^{2}-(b+1)^{2}=(\quad) \text {. }
$$
(A) 0
(B) 3
(C) 4
(D) 8
3. A.

The two inequalities are transformed into
$$
(1-a) x<1-b,(b+3) x<a+3 \text {. }
$$

Since the solution sets of the two inequalities are the same, we have
$$
\begin{array}{l}
(1-a)(a+3)=(1-b)(b+3) \\
\Rightarrow(a+1)^{2}=(b+1)^{2} . \\
\text { Therefore, }(a+1)^{2}-(b+1)^{2}=0 .
\end{array}
$$