Hey, I'm coding something for a website, however, i'm stuck on a bit of Maths which is involved.

I will try my best to explain the issue. Let's say there are 3 layers, each of which occupies the...