If $v = Ve^{-j(wt+A)}, i= Ie^{-j(wt+B)}$ then show that the impedance $z = v/i$ is given by $$Z = (V/I)\cdot[\cos(A-B) + j\sin(A-B)]$$
I get confused because when I used the correct rules, it always comes to $$(V/I)\cdot[\cos(A-B) - j\sin(A-B)]$$ instead because of the rule that $e^{-j(\theta)}=\cos(\theta) - \sin(\theta)$
Well,
$$ \frac{v}{i} = \frac{V}{I}e^{-j(A-B)} = \frac{V}{I} [\cos(-(A-B))+j\sin(-(A-B))]$$ by Euler's formula, then because cosine is even and sine is odd, $$ \frac{v}{i} = \frac{V}{I} [\cos(A-B) -j \sin(A-B)].$$
You got it