Let’s see if we can break this down a bit and remove the politics.
When a message is encrypted with my public key, I am the only one who can decrypt it. Not even the sender can do that. You need the private key, which I have stored on my device. This is where the ‘laws of mathematics’ come in. It simply cannot be done in any reasonable time frame, we are talking years, even with modern computers. Certainly not feasible or even worth trying.
The only way that Facebook would be able to allow government agencies to view these messages would be to provide a way to remotely access the private key on a device and use it to decrypt the message. To do that means providing a backdoor way of accessing the application and extracting the key. No sooner would they do that than someone will find a way to exploit it, of that you can be certain.
With regard to the above preventing terrorists from communicating, encryption has been around for a long time, well before it was added as an extension to things like Whatsapp. All a terrorist will need to do is to encrypt his message in the traditional way with whatever tool he chooses, he could even write one himself, and send that using the platform of his choice. Facebook and all others will be powerless to assist the government in reading those messages. It simply could not be done.
But the government has been a bit hazy on what it actually is they expect Facebook to do, so details are sketchy. I think they want the tech companies to come up with a solution. It remains to be seen if they will comply and if they do, how long it will be before whatever they come with is exploited. You cannot weaken the system just for the bad guys, it will affect all of us. I’m sure a lot of people will not care.