How to use Telnet with Personal Hotspot (tethering)?
OK, I found one solution that works great.

Since the connection between the computers was originally wired with a router, I plugged them both into the router.

Then I removed the default gateway settings from the wired connection. This prevents them from going to the internet via the wired connection.

But, they are both connected to iPhone by wireless or USB (a separate wired connection), so they go to the internet through iPhone. The first time it takes the computer about 10 seconds to figure this out.

The caveat is that you need 2 interfaces for each device and a way to connect separate from iPhone.