This is LaTeX code:
[latex]
P=(\frac{x_1+x_2}{2}, \frac{y_1+y_2}{2})
[/latex]