Answer
See the detailed answer below.
Work Step by Step
The figures below show that the wire and the hollow cylinder have the same center. According to the symmetry, the electric field exerted on the hollow cylinder will be inward or outward from its center.
In other words. the electric field is $xy$ plane while the wire extends in $z$-direction.
The dashed circles on the left figure represent the Gaussian cylindrical surfaces of radius $r$ and height $h$.
The height of the two Gaussian cylindrical surfaces is the same since we are working on changing the radius, not the length.
We will use the Gauss's law of
$$\oint \vec Ed\vec A=\dfrac{Q_{in}}{\epsilon_0}$$
$$\color{blue}{\bf [a]}$$
When $r\lt R$;
$$\oint \vec Ed\vec A=\dfrac{Q_{in}}{\epsilon_0}$$
$$\int_{\rm top} \vec Ed\vec A+\int_{\rm bottom} \vec Ed\vec A+\int_{\rm sides} \vec Ed\vec A=\dfrac{Q_{in}}{\epsilon_0}$$
Assuming that the electric field is uniform and constant inside the Gaussian cylinder.
$$0+0+ EA_{\rm sides}=\dfrac{Q_{in}}{\epsilon_0}$$
where $E=0$ on the top and the bottom of the gaussian cylinder.
Solving for $E$
$$E=\dfrac{Q_{in}}{A_{\rm sides}\epsilon_0}$$
where $A_{\rm sides}=2\pi r h$;
$$E=\dfrac{Q_{in}}{2\pi r h\epsilon_0}\tag 1$$
Now we need to find the enclosed charge for our gaussian cylinder which is given by
$$\lambda=\dfrac{Q_{\rm wire}}{L_{\rm wire}}=\dfrac{Q_{in}}{h}$$
Hence,
$$Q_{in}=h\lambda$$
Plug into (1),
$$E=\dfrac{h\lambda}{2\pi r h\epsilon_0}$$
$$E=\dfrac{ \lambda}{2\pi \epsilon_0}\dfrac{1}{r}$$
And since $\lambda$ is positive, the direction of the electric field is outward away from the center of the cylinder.
$$\boxed{\vec E=\dfrac{ \lambda}{2\pi \epsilon_0}\dfrac{1}{r}\;\hat r}\tag{Outward}$$
$$\color{blue}{\bf [b]}$$
When $r\gt R$;
By the same approach, from (1),
Now we need to find the enclosed charge for our gaussian cylinder which is given by
$$Q_{in}=Q_{\rm cylinder}+Q'_{wire}=2\lambda h+\lambda h$$
where $Q'_{wire}$ is the part of wire enclosed.
$$Q_{in}= 3\lambda h$$
Plug into (1),
$$E=\dfrac{3\lambda h }{2\pi r h\epsilon_0} $$
$$E=\dfrac{3\lambda }{2\pi r\epsilon_0} $$
$$\boxed{\vec E=\dfrac{ 3\lambda}{2\pi \epsilon_0}\dfrac{1}{r}\;\hat r}\tag{Outward}$$