EXPLANATION
The midpoint formula is given by the following expression:
[tex]M=(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2})[/tex]Where A=(x_1,y_1) = (2,5) and B= (x_2,y_2)= (4,1)
Substituting terms:
[tex]M=(\frac{2+4}{2},\frac{5+1}{2})[/tex]Adding numbers:
[tex]M=(\frac{6}{2},\frac{6}{2})=(3,3)[/tex]The midpoint is at (x,y)=(3,3)