Lời giải:
Không mất tổng quát, giả sử $\frac{a}{c}\leq \frac{b}{d}\Rightarrow ad\leq bc$
$\Rightarrow \frac{a}{c}\leq \frac{a+b}{c+d}\leq \frac{b}{d}$
$\Leftrightarrow \frac{a}{c}\leq 1\leq \frac{b}{d}$
Nếu $b\leq 998$:
$d\geq 1\Rightarrow \frac{b}{d}\leq 998$. Kết hợp với $\frac{a}{c}\leq 1$ suy ra $P\leq 999(1)$
Nếu $b=999\Rightarrow a=1$
$P=\frac{1}{c}+\frac{999}{d}=\frac{1}{c}+\frac{999}{1000-c}$
$=\frac{1000+998c}{c(1000-c)}=\frac{1000+998c}{(c-1)(999-c)+999}$
Vì $1\leq c\leq 999\Rightarrow 10000+998c\leq 1000+998.999$
$(c-1)(999-c)+999\geq 999$
$\Rightarrow P\leq \frac{1000+998.999}{999}=999+\frac{1}{999}(2)$
Từ $(1);(2)\Rightarrow P_{\max}=999+\frac{1}{999}$ khi $a=d=1; b=c=999$