2. Let the set $\left\{\left.\frac{3}{a}+b \right\rvert\, 1 \leq a \leq b \leq 2\right\}$ have the maximum element and the minimum element as $M, m$, respectively, then the value of $M-m$ is $\qquad$ .
Answer: $5-2 \sqrt{3}$.
Solution: From $1 \leq a \leq b \leq 2$, we know that $\frac{3}{a}+b \leq \frac{3}{1}+2=5$. When $a=1, b=2$, we get the maximum element $M=5$. Also, $\frac{3}{a}+b \geq \frac{3}{a}+a \geq 2 \sqrt{\frac{3}{a} \cdot a}=2 \sqrt{3}$. When $a=b=\sqrt{3}$, we get the minimum element $m=2 \sqrt{3}$.
Therefore, $M-m=5-2 \sqrt{3}$.