It has been a long time since math classes, however I need some algebra for a website I am working on. I am pretty much lost as how to get the number I need. So, here is an equation I am trying to solve:

D = B x .80

A = 120 + B + (D x 2) + ((D x.80) x 2)

I am absolutely horrible with explanations so I made a diagram explaining what I am trying to accomplish.

I need a solution in the form of B = A ......... I will know what A is at runtime, so if I can find a function I can create B and then create the rest of the objects. The problem is that A will change based on the users screen size, so I need a function like this to come up with B based on that.

Thanks for any help, i'm pretty lost on this one.