Brian,
They are not equal.
If you substitute your expression (as fixed by Michael's suggestions above) you get:
In[8]:= yy[x] = E^-x (2 + Pi) - 2 Sin[x]
Out[8]= E^-x (2 + \[Pi]) - 2 Sin[x]
In[12]:= FullSimplify[D[yy[x], x] + yy[x] == 4 Sin[x]]
Out[12]= Cos[x] + 3 Sin[x] == 0
And you can verify this another way by directly solving the original equation:
In[3]:= ans = DSolve[y'[t] + y[t] == 4 Sin[t], y[t], t]
Out[3]= {{y[t] -> E^-t C[1] + 2 (-Cos[t] + Sin[t])}}