If the length is twice the width, then we could write [tex]l = 2w[/tex] and [tex]w = w[/tex]. For perimeter, there are two length measures and two width measures.
[tex]p = 2l + 2w[/tex]
This can be converted into
[tex]2(2w) + 2(w) = p[/tex]
Hope I answered your question.