/etc/dhcpcd.conf
interface eth0
static ip_address=192.168.4.57/24
static domain_name_servers=192.168.4.57 8.8.8.8
interface wlan0
static ip_address=192.168.4.56/24
static domain_name_servers=192.168.4.56 8.8.8.8
This will also set /etc/resolv.conf for dns servers