<s>[INST] Graphing Functions Algebra Suppose $f(x),g(x),h(x)$ are all linear functions, and $j(x)$ and $k(x)$ are defined by $$j(x) = \max\{f(x),g(x),h(x)\},$$ $$k(x) = \min\{f(x),g(x),h(x)\}.$$ This means that, for each $x$, we define $j(x)$ to be equal to either $f(x),$ $g(x),$ or $h(x),$ whichever is greatest; similarly, $k(x)$ is the least of these three values.
Shown below is the graph of $y=j(x)$ for $-3.5\le x\le 3.5$.
Let $\ell$ be the length of the graph of $y=k(x)$ for $-3.5\le x\le 3.5$. What is the value of $\ell^2$?

Since the function $j(x)$ is made up of 3 parts. I first tried to find the equations of each of the lines. The horizontal line is just $j(x)=2  [-2\le{x}\le{2}]$. The other two lines have almost the same equation - the only thing that differs is their slope. I used point-slope form to find that the equation of the left-most line is $j(x)=-2x-2  [-3.5\le{x}\le{-2}]$, and the equation of the right-most line is $j(x)=2x-2 [2\le{x}\le{3.5}]$. Therefore, the slopes of the two lines, respectively, are $-2$ and $2$.
Then, I tried finding the total length of the function $j(x)$. I drew a perpendicular line from the top point of the right-most function until it met the line $y=2$. The distance between the point where it meets and the red dot is $1.5$. Since the slope is $2$, the change in $y$ goes up by $(1.5)(2)=3$. The same is true with the left-most function.  Then, I used the Pythagorean theorem, $\sqrt{1.5^2+3^2}$, to find the lengths of the two slanted sides. I got $\sqrt{11.25}$. So, the total length is $4+2\sqrt{11.25}$.
However, I'm don't know how to find the relationship between $j(x)$ and $k(x)$ (aka how the maximum and minimum are related).
 [/INST] 
Since the functions $f(x),g(x),h(x)$ are linear, every interval that $j(x)$ maps to a line is in the domain of one of the linear functions.
If we extend the lines corresponding to the $3$ functions, (and choose the function with the smallest value for each $x$) we can see that $k(x)$, from left to right, is the rightmost function for $j(x)$ upto its intersection point with the leftmost line of $j(x)$ and then the leftmost function of $j(x)$.
The left and right functions are:
\begin{eqnarray}
L_1&=&-2x-2\\
L_2&=&2x-2\\
L_1&\overset{\tiny \text{set}}{=}&L_2\\
x&=&0\\
L_1(0)&=&L_2(0)=-2\\
L_1(3.5)&=&-9\\
L_2(3.5)&=&5\\
\end{eqnarray}
Now we can calculate $\ell$ using Pythagoras' theorem:
\begin{eqnarray}
\ell&=&\sqrt{3.5^2+(-2-(-9))^2}+\sqrt{3.5^2+(-2-5)^2}\\
&=&2\sqrt{3.5^2+7^2}\\
\ell^2&=&4(3.5^2+7^2)\\
&=&(2\cdot 3.5)^2+4\cdot 7^2\\
&=&5\cdot 7^2\\
&=&5\cdot 49\\
&=&245\\
\end{eqnarray}
</s>