Remove the single quotes, define ‘x’ as ‘x(t)’, and define ‘Dx’ (and ‘D2x’ if you want to), explicity:
syms x(t) t s X F
Dx = diff(x);
D2x = diff(Dx);
F=laplace(D2x+5*Dx+610*x(t)-exp(-t),s);
F=subs(F,{laplace(x(t),t,s)},{X});
F=subs(F,{x(0),Dx(0)},{0,0});
x=solve(F,X);
x=ilaplace(x)
producing in LaTeX format —

The code is otherwise unchanged.
