There is no benefit to running multiple MongoDB nodes on the same server, and there are severe downsides.
The point of a replica set is to provided redundancy, for example in the case of a hardware or networking failure. But if all three nodes are on the same server, then any such failure will affect all three at once - so this setup will fail to provide any redundancy.
The downsides: multiple MongoDB instances on the same server will run into memory conflicts, leading to performance problems.
If you want to use transactions, then you can set up a replica set with just one member. You don't get any benefits of redundancy or availability, but it will let you get started with transactions.