Hey is it alrite to write both as solutions i.e. x = .... or ..... OR do i hav to just write the 1st solution?
Well, writing both is not wrong so I doubt you'd be penalised in an exam. But if you can recognise that one general solution is a subset of another, you'll have a more elegant answer.
But if in the slightest doubt, you should always write both.