It depends on the type of Proxy Server deployment you have. If you use on-host deployment, Backup Server and Proxy Server can use different OS; but, if in a case of off-host deployment operating systems should be same. Backup repository can have any OS. Here
is a similar question.
By the way, before using Windows Server 2012 R2 for Veeam Backup Server, make sure Veeam Backup & Replication 7.0 R2 Update