I have two Pi's, one is Pi 3 Model B and the other is Pi 2 model B. I have connected the Pi's together via Ethernet. The Pi's have been assigned static IP address:

-- Pi 3 (eth0 ip) --> 192.168.137.170

-- Pi 2 (eth0 ip) --> 192.168.137.10

I am able to SSH from Pi 3 to Pi 2 and vice versa.

I start a Wi-Fi hotspot on windows laptop and connect Pi 3 to it. The wlan ip assigned to Pi 3 is 192.168.137.33.

Now there are two cases:

-- Disconnect the Ethernet connection between the Pi's, then SSH from windows (PuTTY) to Pi 3 over Wi-Fi

-- Keeping the Ethernet connected between the Pi's, then trying to SSH from windows (PuTTY) to Pi 3 over Wi-Fi doesn't work. PuTTY throws "Connection timed out" error.

I would like to SSH from windows into Pi 3 over Wi-Fi, then through this PuTTY session SSH into Pi 2 over Ethernet. Could please someone help me how to do it.