$$y'-\frac{y}{x}=1$$
We have a linear ODE in the form of $y'+P(x)y=Q(x)$ so we will use variation of parameters.
$y_{h}: y'-\frac{y}{x}=0$
$y_{h}: \frac{dy}{dx}=\frac{y}{x}$
$y_{h}: \frac{dy}{y}=\frac{dx}{x}$
$y_{h}: ln|y|=ln|x|+C$
$y_{h}=Kx$
$y_{p}=K(x)x$
$y'_{p}=K'(x)x+K(x)$
Substitute $y'_{p},y_{p}$ in the original ODE to get:
$K'(x)x+K(x)-\frac{K(x)x}{x}=1$
$K'(x)x+K(x)-K(x)=1$
$K'(x)x=1$ (Can I divide by $x$?)
$K'(x)=\frac{1}{x}$
$K(x)=ln|x|$
So $y_{p}=ln|x|x$
$y=y_{h}+y_{p}=Kx+ln|x|x$