given line segment CE with midpoint D(1,5) and endpoint C(0,-2), the coordinate of endpoint E is

D = (C+E)/2

or,
E = 2D-C
so plug in C and D, both for x and y.