The midpoint formula is just the coordinates of the halfway point between two points on a line.
\(\displaystyle M_{x}=\frac{x_{1}+x_{2}}{2}, \;\ M_{y}=\frac{y_{1}+y_{2}}{2}\)
But, we have to find the end point given the midpoint and the other end of the line segment.
Let the coordinates of \(\displaystyle B =(x,y), \;\ A=(r,s), \;\ M=(0,2)\)
\(\displaystyle \frac{r+x}{2}=0, \;\ \frac{s+y}{2}=2\)
\(\displaystyle x=-r, \;\ y=4-s\)
B has coordinates \(\displaystyle (-r, \;\ 4-s)\)
Use some arbitrary values to check it out.