Try:
sudo ping -I 192.168.10.80 172.31.40.191
This will alter source IP address instead of alter source interface.
And you probably can't use
ping 172.31.40.191
right away, as this uses 169.254.x.x as source address. Windows won't route packets back to those addresses