[tex]If\ \dfrac{x-c}{2}=d\ \ \ |multiply\ both\ sides\ by\ 2\\\\x-c=2d\ \ \ |subtract\ x\ from\ both\ sides\\\\-c=2d-x\ \ \ |change\ the\ signs\\\\\boxed{c=x-2d}\\\\If\ x-\dfrac{c}{2}=d\ \ \ |subtract\ x\ from\ both\ sides\\\\-\dfrac{c}{2}=d-x\ \ \ \ |multiply\ both\ sides\ by\ (-2)\\\\\boxed{c=-2(d-x)\to c=2x-2d}[/tex]