That looks like very simple circle/circle distance queries and pushing them out of the way. circle/circle collision is simply checking whether distance between center points is smaller than sum of radii, and collision separation axis is simply vector between center points, normalized.
Anyway, there are a number of 2D physics libraries for JavaScript. You can easily find them on Google. Try something like this list:
https://github.com/bebraw/jswiki/wiki/Physics-libraries
Then, you have to make the important decision: Do you "speculate" (simulate ahead, and get corrected by the server) on the client, or do you send commands to the server, and only show the server-validated outputs of those commands? And if the former, how do you deal with being told the player didn't actually do what they think they did?
And then the second decision: Do you show "remote entities" sent from the server to you, in forward-extrapolated positions (estimates of where they are "now") or do you show them in known-correct positions, in the past? And if the former, how do you deal with players thinking that they could see/shoot/whatever a remote player, where that position was only estimated and in actuality they were behind cover?
You need to decide what you want for your gameplay, first, and then you can think how physics and networking interact.