x=(({{0, 1}, {0, 0}}));a=(α/2)(({{-1, 0}, {0, 1}})); A=MatrixExp[-ℏ β a]; y=(({{0, 0}, {1, 0}})); b=(({{s, 0}, {0, s}}))-(β/α)a; B=MatrixExp[-ℏ α b];

{a.x-x.a==-α x, a.y-y.a==α y}

{b.y-y.b==-β y, x.b-b.x==-β x}

β a+α b // Simplify //MatrixForm

eqns=Thread[Flatten/@(x.y-y.x==((B-A)/ℏ))]

Solve[eqns,s]

eqns /. β->0

Solve[eqns /. β->0, ℏ]