<s>[INST] Calculate $\sqrt{x^2+y^2+2x-4y+5} + \sqrt{x^2+y^2-6x+8y+25}$, if $3x+2y-1=0$ As the title says, given $x,y \in \mathbb{R}$ where $3x+2y-1=0$ and $x \in [-1, 3]$, calculate $A = \sqrt{x^2+y^2+2x-4y+5} + \sqrt{x^2+y^2-6x+8y+25}$. 
I tried using the given condition to reduce the complexity of the roots, but couldn't get rid of them.
 [/INST] $-1\le x\le3\iff-2\le x-1\le2$
WLOG  $x-1=2\cos u\iff y=-1-3\cos u$
$x^2+y^2-6x+8y+25=(x-3)^2+(y+4)^2=(2^2+3^2)(1-\cos u)^2$
$\implies\sqrt{x^2+y^2-6x+8y+25}=\sqrt{13}(1-\cos u)$ as $1-\cos u\ge0$
Can you take it from here?
</s>