\[ y'(x)-(y(x)+x)^2=0 \] ✓ Mathematica : cpu = 0.0701077 (sec), leaf count = 14
DSolve[-(x + y[x])^2 + Derivative[1][y][x] == 0,y[x],x]
\[\{\{y(x)\to -x+\tan (x+c_1)\}\}\] ✓ Maple : cpu = 0.044 (sec), leaf count = 16
dsolve(diff(y(x),x)-(y(x)+x)^2 = 0,y(x))
\[y \left (x \right ) = -x -\tan \left (-x +c_{1}\right )\]
Hand solution
\begin {align} y^{\prime }-\left ( y+x\right ) ^{2} & =0\nonumber \\ y^{\prime } & =\left ( y+x\right ) ^{2}\tag {1} \end {align}
This is Riccati first order non-linear ODE of the form. Let \(u=y+x\), then \(u^{\prime }=y^{\prime }+1\) and (1) becomes\begin {align*} u^{\prime }-1 & =u^{2}\\ u^{\prime } & =1+u^{2} \end {align*}
This is separable\begin {align*} \frac {du}{dx}\frac {1}{1+u^{2}} & =1\\ \int \frac {du}{1+u^{2}} & =\int dx\\ \tan ^{-1}u & =x+C\\ u & =\tan \left ( x+C\right ) \end {align*}
Since \(u=y+x\) then
\[ y=\tan \left ( x+C\right ) -x \]