That's quite confusingly shown;
show what's being square rooted with brackets; don't mix variables (like x and X):
√(13 - x) = x - 1
square both sides:
13 - x = x^2 - 2x + 1 : understand?
x^2 - x - 12 = 0
I'll give you the satisfaction of finishing it!