Show algebraically that tan x = sin2x – sin x / cos2x – cosx + 1

How can I show this algebraically,

tan x = sin2x – sin x / cos2x – cosx + 1

I don’t know where to begin. I simply know, that tan x = sin/cos.