I have a tamed wolf that I want to take with me when I travel on my railway. The trip is about 1 km long and he keeps blocking my way. Occasionally, he will voluntarily get into an empty cart. I have a 2 part question: 1. How do I make him get in and out of the cart? 2. Can he get in the cart I am in? I guess the same questions could be asked about boats too.
To get him in to a boat or cart, push the vehicle towards him. When it collides with him he'll get in. It can take a couple of tries.
He can ride in a boat with you, but minecarts are single passengers only.
To get him out, you can destroy the vehicle by punching it, and he'll bounce out when it turns into an item. If he's in a minecart, you can run that minecart over a powered activator rail to kick him out without destroying the minecart. This is generally safer, as you can't accidentally hit him.