find d^2/dx^2 as a function of x if siny + cosy = x

i tried to solve this problem this way

differentiating once makes cos y (dy/dx) - sin y (dy/dx) = 1

dy/dx (cos y - siny) = 1

differentiating this makes d^2y/dx^2 (cosy - siny) -dy/dx (sin y + cos y) = 0

d^2y/dx^2 (cos y -siny) - x(dy/dx) = 0

from there i isolate d^2y/dx^2, but apparently its wrong

can anyone help?