I got your point: you have the ODE $y''=y'+x$, and we can see that $y(x)=-\frac{x^2}{2} - x$ solves the problem. As you want to integrate it numerically, you want to set two initial conditions, so you imposed $y(0)=0$ (and that's fine) and also another one $y(h)$, which is wrong because it's not the required information you need to solve an ODE, mainly because it's not initial condition. What you need is $y'(0)=-1$
Given that, you can recast everything into a first order system (see @WolfgangBangerth's comment)
\begin{cases}
y' = u \\
u' = u + x \\
y(0)=0 \\
u(0)=-1
\end{cases}
Now you can choose the time integration scheme you prefer. Since you mentioned Backward Euler, just set the vector valued function $f(x,Y) = [u,u+x]$,
where $Y=[y,u]$ is your solution vector,
and then solve $$Y_{n+1} = Y_n + h f(x_{n+1},Y_{n+1})$$ at each time step. Notice, however, that you can avoid to use a non-linear solver, as the r.h.s. may be written as $$A Y +b$$ where
$A=
\begin{bmatrix}
0 & 1 \\
0 & 1
\end{bmatrix}$
and $b= \begin{bmatrix} 0 \\ x \end{bmatrix}$
and hence your ODE becomes
$$Y' = A Y + b$$
and Backward Euler reads $$Y_{n+1} = Y_n + h(A Y_{n+1} + b(x_{n+1}))$$ i.e.
$$Y_{n+1} =(I_2 - hA)^{-1}(Y_n + h b(x_{n+1}))$$
This can be written in a simple Python snippet:
import numpy as np
import matplotlib.pyplot as plt
def sol(x):
return -.5*x**2 - x
def b(x):
return np.array([0,x])
A = np.array([[0,1],[0,1]])
Y0 = np.array([0.0,-1.0])
h = 0.01
T = 1.0
n = int(T/h)
x = np.linspace(0,T,n+1)
Y = np.zeros([2,n+1])
Y[:,0] = Y0.copy()
I = np.eye(2)
error = np.zeros(n)
for i in range (0,n):
Y[:,i+1] = np.linalg.solve(I-h*A, Y[:,i]+ h*b(x[i+1]))
plt.plot(x,Y[0,:],'o',markerfacecolor='None')
plt.plot(x,sol(x),'-r')
plt.show()
which reproduce the solution correctly
Notice that I wrote a snippet for this particular case, with this particular r.h.s. just because it's linear! Otherwise, a Newton method would have been employed to solve the non-linear system at each time step. This latter approach can be applied wherever your r.h.s. $f$ is.