s1='x*(a+b-x)=a*b*exp(5(b-x))';
x=solve(s1,'x')
或者
syms a b;
x=solve('x*(a+b-x)=a*b*exp(5(b-x)) ','x')