To calculate the perimeter of a rectangle you have to add all of its sides, that is
[tex]P=w+w+l+l[/tex]You can simplify it as:
[tex]P=2w+2l[/tex]If you know the perimeter and width of a rectangle, you can calculate the length.
First write the formula in terms of the length:
[tex]\begin{gathered} P-2w=2l \\ l=\frac{P-2w}{2} \\ l=\frac{P}{2}-\frac{w}{2} \\ l=\frac{P}{2}-w \end{gathered}[/tex]For P=12mm and w=2mm
[tex]\begin{gathered} l=\frac{P}{2}-w \\ l=\frac{12}{2}-2 \\ l=4 \end{gathered}[/tex]The length of a rectangle with perimeter of 12mm and width of 2mm is 4mm