2. The sum of the sum and the product of two positive integers is 2005, and one of them is a perfect square. Then the difference between the larger number and the smaller number is
$2.1001,101$.
Let the larger of these two positive integers be $x$, and the smaller one be $y$, then
$$
x y + x + y = 2005 \text{, }
$$

which means $(x+1)(y+1)=2006$.
Notice that, the only possibilities are
$$
(x+1)(y+1)=2 \times 1003 = 17 \times 118 \text{, }
$$

Therefore, $x-y=1001$ or $x-y=101$.