I am having trouble understanding how somethign came up, I am sure it's something stupid that I just can't notice right now but I will ask anyway.

So to derive the cos (x+y) and sin(x+y) identities we write

= (cosx + isinx)(cosy +isiny)

= cosxcosy + isinxcosy + isinycosx- sinxsiny

= cosxcosy - sinxsiny + i(sinxcosy + sinycosx)

Therefore, cos(x+y) = cosxcosy - sinxsiny

sin(x+y) = sinxcosy + sinycosx

However, I do not understand the bolded part because I am thinking that (isinx)(isiny) would = isinxisiny. So how did we get the negative sign and the elimination of the i's?