Answer: 14
Step-by-step explanation:
[tex]\text{The midpoint of the segment is } \left(\frac{2+2}{2}, \frac{10+k}{2} \right)=(2, 5+0.5k). \\ \\ \text{We know that the line passing through this midpoint is } y=7 \\ \\ \text{so } 0.5k=7 \longrightarrow \boxed{k=14}[/tex]