Let the width of the frame = x
Let the cost of a linear foot of the frame = y
Let the inside dimension of the length of the frame = a
Let the inside dimension of the width of the frame = b.
The total length of the frame = 2*a + 4x
The total width of the frame = 2b
The total amount of the frame in feet is (2a + 4x + 2b)*y = Cost
If this is incorrect please leave a message on my home page.