Answer
$$y = \frac{{3 + 197{e^{4 - x}}}}{x}$$
Work Step by Step
$$\eqalign{
& x\frac{{dy}}{{dx}} + \left( {1 + x} \right)y = 3,\,\,\,\,\,\,\,\,\,\,\,y\left( 4 \right) = 50 \cr
& {\text{divide by x}} \cr
& \frac{{dy}}{{dx}} + \left( {\frac{1}{x} + 1} \right)y = \frac{3}{x} \cr
& {\text{this equation is already written in the form }}\frac{{dy}}{{dx}} + P\left( x \right)y = Q\left( x \right) \cr
& {\text{comparing }}\frac{{dy}}{{dx}} + \left( {\frac{1}{x} + 1} \right)y = \frac{3}{x}{\text{ with }}\frac{{dy}}{{dx}} + P\left( x \right)y = Q\left( x \right){\text{ we can see that }} \cr
& P\left( x \right){\text{ is}}\,\,\,\,\frac{1}{x} + 1.\,\,\,{\text{The integrating factor is }}I\left( x \right) = {e^{\int {P\left( x \right)} dx}} \cr
& I\left( x \right) = {e^{\int {\left( {\frac{1}{x} + 1} \right)} dx}} = {e^{\ln x + x}} = {e^{\ln x}}{e^x} = x{e^x} \cr
& {\text{multiplying both sides of the differential }}\frac{{dy}}{{dx}} + \left( {\frac{1}{x} + 1} \right)y = \frac{3}{x}{\text{ equation by }}x{e^x} \cr
& x{e^x}\frac{{dy}}{{dx}} + \left( {\frac{1}{x} + 1} \right)x{e^x}y = 3{e^x} \cr
& {\text{Write the terms on the left in the form }}{D_x}\left[ {I\left( x \right)y} \right] \cr
& {D_x}\left[ {x{e^x}y} \right] = 3{e^x} \cr
& {\text{solve for }}y{\text{ integrating both sides}} \cr
& x{e^x}y = \int {3{e^x}} dx \cr
& x{e^x}y = 3{e^x} + C \cr
& y = \frac{3}{x} + \frac{C}{{x{e^x}}}\,\,\,\,\,\left( {\bf{1}} \right) \cr
& {\text{we can find the constant }}C{\text{ using the initial value problem}}\,\,\,y\left( 4 \right) = 50 \cr
& {\text{substituting these values into }}\left( {\bf{1}} \right) \cr
& 50 = \frac{3}{4} + \frac{C}{{4{e^4}}} \cr
& \frac{{197}}{4} = \frac{C}{{4{e^4}}} \cr
& C = 197{e^4} \cr
& {\text{substitute }}C = 197{e^4}{\text{ into }}\left( {\bf{1}} \right){\text{ to find the particular solution}} \cr
& y = \frac{3}{x} + \frac{{197{e^4}}}{{x{e^x}}} \cr
& y = \frac{3}{x} + \frac{{197{e^{4 - x}}}}{x} \cr
& y = \frac{{3 + 197{e^{4 - x}}}}{x} \cr} $$