For computer X to connect to Z, you'll either need to Route through Y or enable IP forwarding on Y. The only requirement is that Y will need two network cards and each card will be plugged into each segment.
If you all you require is simple forwarding you can use these articles to help you set that up on Y.
You do not set up any ports to listen on. You have to configure X's default gateway to point to the Ip address of the NIC on Y (on the same segment). You configure Z's default gateway to point to Y's NIC (on the same segment)
If you require something more complex, you could install a Server OS on Y, and hide Z behind via NAT services. In this scenario, you would NOT be routing, but indeed port forwarding. You expose the port on computer Y which maps back to
a port on Z. However, Z, would not be able to directly communicate with X. This design would be very similar to a private network protected the internet by a NAT router.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.