Wifi works with VPN only after connecting second modem

All of the android devices connects fine but the wifi on both of my laptops doesn't work. Wifi starts working if i disconnect the second modem or if i use vpn. Tried updating drivers and changing IPv4 settings. OS is win 10 pro. Main modem is D link dsl 2750u.