If a Finder window is opened while another Finder window exists, cmd+w will exit to the other Finder window, not previous app I am working on
No. To follow your first example, the Finder is the active application at the time you hit ⌘+w to close the second Finder window. So you remain in the Finder and the first Finder window is brought to the front.

One thing you could do is switch back to Chrome first (e.g. with ⌘+tab), then click the second Finder window's close button (assuming it isn't obscured by the Chrome window). That'll close the Finder window in the background while keeping Chrome as the active application.