Step 1: Identify the equation as a linear differential equation.
The given equation is
\[
\frac{dy}{dx}+y=e^{-x}
\]
This is in the standard linear form
\[
\frac{dy}{dx}+P(x)y=Q(x)
\]
where
\[
P(x)=1,\qquad Q(x)=e^{-x}
\]
Step 2: Find the integrating factor.
The integrating factor is
\[
I.F.=e^{\int P(x)\,dx}=e^{\int 1\,dx}=e^x
\]
Step 3: Multiply the whole equation by the integrating factor.
Multiplying by \( e^x \), we get
\[
e^x\frac{dy}{dx}+e^x y=e^x\cdot e^{-x}
\]
\[
e^x\frac{dy}{dx}+e^x y=1
\]
Step 4: Recognize the left side as a product derivative.
We know that
\[
\frac{d}{dx}(ye^x)=e^x\frac{dy}{dx}+e^x y
\]
Therefore the equation becomes
\[
\frac{d}{dx}(ye^x)=1
\]
Step 5: Integrate both sides.
Integrating with respect to \( x \),
\[
\int \frac{d}{dx}(ye^x)\,dx=\int 1\,dx
\]
\[
ye^x=x+C
\]
Step 6: Use the initial condition \( x=0,\ y=1 \).
Substitute
\[
x=0,\qquad y=1
\]
into
\[
ye^x=x+C
\]
Then,
\[
1\cdot e^0=0+C
\]
\[
1=C
\]
So the solution becomes
\[
ye^x=x+1
\]
Step 7: Final conclusion.
Hence, the required solution is
\[
\boxed{ye^x=x+1}
\]
Therefore, the correct option is
\[
\boxed{(3)\ ye^x=x+1}
\]