Difference between the maximum and minimum values ​of $a+b$ that satisfy $a+b+\frac{1}{a}+\frac{9}{b}=10, (a,b\in\mathbb{R}^+)$

Using the CS-inequality "Engels" form we have: $10 = a+b+\dfrac{1^2}{a}+\dfrac{3^2}{b} \ge a+b+\dfrac{(1+3)^2}{a+b}=a+b+\dfrac{16}{a+b}=x+\dfrac{16}{x}\implies 10x\ge x^2+16\implies x^2-10x+16 \le 0\implies (x-2)(x-8) \le 0\implies 2 \le x = a+b \le 8 \implies \text{max - min} = 8 - 2 = 6$. The minimum value of $a+b$ is $2$ which occurs when $a+b=2, \dfrac{1}{a} = \dfrac{3}{b} \implies a = \dfrac{1}{2}, b = \dfrac{3}{2}$. The maximum of $a+b$ is $8$ which occurs when $a+b = 8, b = 3a \implies a=2,b=6$.


Let $s=a+b$.

Replacing $b$ by $s-a$ in the given equation, we get $$ s+\frac{1}{a}+\frac{9}{s-a}=10\;\;\;(*) $$ Regarding $s$ as an implicit finction of $a$, and differentiating the above equation with respect to $a$, we get $$ s'-\frac{1}{a^2}-\frac{9(s'-1)}{(s-a)^2}=0 $$ Setting $s'=0$, we get $(s-a)^2=9a^2$, which gives $s=4a$.

Replacing $a$ by ${\Large{\frac{s}{4}}}$ in $(*)$, we get $$ s+\frac{16}{s}=10 $$ which has solutions $s=2$ and $s=8$.

Thus, subject to constraint $(*)$, the difference between the maximum and minimum values of $s$ is $8-2=6$.