There are coordinates of two vertices in a regular octagon $$\{A_0,A_1,...,A_7\}$$
with Cartesian coordinates $A_0 = (2,-4)$, $A_2 = (0,0)$.
The task is to find coordinates of all other vertices.
I have found coordinates of centre of a circle which is inscribed by octagon $S=(-1,-3)$ by the following formula $$A_k-S = (A_0-S)(\cos(2k\pi/8) + i\sin(2k\pi/8))=$$
$$=A_k-S = (A_0-S)(\cos(k\pi/4) + i\sin(k\pi/4)),\tag 1$$ where $S = a+ib$ for $k=2$ it's $$A_k-S = (A_0-S)(\cos(2\pi/4) + i\sin(2\pi/4))\tag 2$$ $$0-a-bi = (2-4i-a-bi)(\cos(\pi/2) + i\sin(\pi/2))$$ $$-a-bi = (2-4i-a-bi)i$$ $$0 = 2i+4-ai+b+a+bi$$
$a+b+4 = 0$ and $-a+b+2 = 0$ , $a = -1$, $b=-3$ , then $S=(-1,-3)$ , but geometrically it doesn't make any sense. Which mistake I have done? Thanks for help.
HINT
Having learned the coordinates of $S$ you can use the formula you have been using: $$A_k = (A_0-S)(\cos(k\pi/4) + i\sin(k\pi/4))+S.$$
but with $k=1$.