If you have not modified the default ACL then that should not be the problem.
Since it worked when you were at home, I believe your already have the correct route set in your VPC route table (0.0.0.0/0 to internet gateway).
I would start pinging the RDS connection endpoint to make sure you are able to resolve the hostname and there is no typo (I made this mistake before).
My first guess is that the issue lies in the RDS instance security group inbound setting. You need to make sure you are allowing port 5432 (Postgres default port) connection from either 0.0.0.0/0 (Anywhere in the world) or your location Y IP address (Checkout whatismyip.com if you are unsure).
If you have a multi-az deployment, another unlikely scenarios might be that the RDS instance in subnet A failed over to the secondary RDS instance in subnet B, which has a different subnet / route table setting.