Example 1Transform the PDE by hand. Now proceed.
DSolve[u''[x]-s u[x]==-(1+Sin[Pi x]),u[x],x]; U[x_,s_]:=Evaluate[u[x]/.Flatten[%]] U[x,s]
Include the initial conditions:
DSolve[{u''[x]-s u[x]==-(1+Sin[Pi x]),u[0]==1/s,u[1]==1/s},u[x],x];
U[x_,s_]:=Evaluate[u[x]/.Flatten[%]]
U[x,s]Transform back to get u(x,t).
u[x_,t_]:=InverseLaplaceTransform[U[x,s],s,t] u=u[x,t]
p0=Plot[u/.t->0,{x,0,1},PlotRange->{0,2}];
p1=Plot[u/.t->.25,{x,0,1},PlotRange->{0,2}];
p2=Plot[u/.t->.5,{x,0,1},PlotRange->{0,2}];
Show[p0,p1,p2];