Answer:
k = -3 or 5
Step-by-step explanation:
The given parameters are;
The line extends from points (-1, 1) to point (2, k)
The length of the line = 5 units
The formula for the length, l, of a line given its coordinates can be found by the following formula;
![l = \sqrt{\left (y_{2}-y_{1} \right )^{2}+\left (x_{2}-x_{1} \right )^{2}}](https://tex.z-dn.net/?f=l%20%3D%20%5Csqrt%7B%5Cleft%20%28y_%7B2%7D-y_%7B1%7D%20%20%5Cright%20%29%5E%7B2%7D%2B%5Cleft%20%28x_%7B2%7D-x_%7B1%7D%20%20%5Cright%20%29%5E%7B2%7D%7D)
Therefore, we have;
![5 = \sqrt{\left (k-1 \right )^{2}+\left (2-(-1) \right )^{2}}](https://tex.z-dn.net/?f=5%20%3D%20%5Csqrt%7B%5Cleft%20%28k-1%20%5Cright%20%29%5E%7B2%7D%2B%5Cleft%20%282-%28-1%29%20%20%5Cright%20%29%5E%7B2%7D%7D)
Which, by squaring both sides, gives;
25 = (k - 1)² + (2 - (-1))² = (k - 1)² + (2 + 1)² = (k - 1)² + 3²
25 = (k - 1)² + 3² = k² - 2·k + 1 + 9
25 - 25 = 0 = k² - 2·k + 1 + 9 - 25 = k² - 2·k - 15
0 = k² - 2·k - 15
0 = (k +3) × (k - 5)
Therefore, k = -3 or 5
When k - -3, we have;
![\sqrt{\left ((-3)-1 \right )^{2}+\left (2-(-1) \right )^{2}}= \sqrt{(-4)^2+3^2} = \sqrt{16 + 9} = \sqrt{25} = 5](https://tex.z-dn.net/?f=%5Csqrt%7B%5Cleft%20%28%28-3%29-1%20%5Cright%20%29%5E%7B2%7D%2B%5Cleft%20%282-%28-1%29%20%20%5Cright%20%29%5E%7B2%7D%7D%3D%20%5Csqrt%7B%28-4%29%5E2%2B3%5E2%7D%20%3D%20%5Csqrt%7B16%20%2B%209%7D%20%20%3D%20%5Csqrt%7B25%7D%20%3D%205)
When k = 5, we have;
![\sqrt{\left (5-1 \right )^{2}+\left (2-(-1) \right )^{2}}= \sqrt{4^2+3^2} = 5](https://tex.z-dn.net/?f=%5Csqrt%7B%5Cleft%20%285-1%20%5Cright%20%29%5E%7B2%7D%2B%5Cleft%20%282-%28-1%29%20%20%5Cright%20%29%5E%7B2%7D%7D%3D%20%5Csqrt%7B4%5E2%2B3%5E2%7D%20%3D%205)