Didn’t the UK have a deal with Poland that if anyone attacks Poland the UK will attack them? That’s why the UK declared war on the Third Reich. So why didn’t they declare war on the USSR since the soviets also attacked Poland?
You might be interested in /u/Georgy_K_Zhukov's answer to a similar question a couple of weeks ago here.