It's pretty basic algebra:
You have the formula s = ut-1/2at2 and want to solve for a. To "solve for a" means to change it into an equation like
a= something.
You do that using two basic concepts: (1) For everything that is alread "done" to a, do the opposite (2) Anything you do to one side of the equation you must do to the other.
So:
s= ut- (1/2) at2. a is not "by itself" because it has been multiplied by -(1/2)t2 and has ut added to itself. The opposite of adding ut is subtracting ut: subtracting ut from both sides gives
s- ut= ut- (1/2) at2- ut = -(1/2) at2
Now the only problem is that a is multiplied by -(1/2) t2.
So, divide both sides of the equation by -(1/2) t2.
That gives (s- ut)/((-1/2)t2)= a so, after a little simplifying, that the value of a:
a= -2(s-ut)/t2.