I desperately need a formula to figure out the width of a rectangle when only given the length.

The perimeter of a rectangle is related to its width and length by
p = 2*W + 2*L
The area of a rectangle is just
A = W*L
If you want the area to be the same (numerically) as the perimeter, you just throw the two equations together by requiring p=A, i.e.
2*W + 2*L = W*L
Now you are given L and want to solve for W. This is pretty easy:
2*W + 2*L = W*L :: subtract W*L from both sides
2*W  W*L + 2*L = 0 :: subtract 2*L from both sides
2*W  W*L = 2*L :: factor out a W from the left
W*(2L) = 2*L :: divide both sides by (2L)
W = 2*L / (2L) :: get rid of the negative sign by flipping the bottom's terms
W = 2*L / (L2)
For instance, with L = 6, this gives W = 2*6 / (62) = 12/4 = 3.
p = 2*W + 2*L
The area of a rectangle is just
A = W*L
If you want the area to be the same (numerically) as the perimeter, you just throw the two equations together by requiring p=A, i.e.
2*W + 2*L = W*L
Now you are given L and want to solve for W. This is pretty easy:
2*W + 2*L = W*L :: subtract W*L from both sides
2*W  W*L + 2*L = 0 :: subtract 2*L from both sides
2*W  W*L = 2*L :: factor out a W from the left
W*(2L) = 2*L :: divide both sides by (2L)
W = 2*L / (2L) :: get rid of the negative sign by flipping the bottom's terms
W = 2*L / (L2)
For instance, with L = 6, this gives W = 2*6 / (62) = 12/4 = 3.

area = perimeter of rectangle
l * w = 2(l + w )
l * w  2w = 2* l
w (l  2 ) = 2 * l
w = 2 * l / (l  2 ) unit ans
l * w = 2(l + w )
l * w  2w = 2* l
w (l  2 ) = 2 * l
w = 2 * l / (l  2 ) unit ans

You must have been given more info than that... the area or perimeter of the rectangle was surely given to you?