Digtial FIR Impulse response & transfer function
You can solve this with high-school algebra and the time delay property
$$ \mathcal{Z}(x(n-k)) = z^{-k} X(z) $$
Applying this to your expression
$$y(n)=2x(n)-1x(n-1)+3x(n-2)$$
we get
$$Y(z) = 2 X(z) - X(z)z^{-1} + 3X(z)z^{-2}$$
$$\frac{Y(z)}{X(x)} = 2z^{-2} - z^{-1} + 3$$
The denominator is null because the filter is not recursive