Question 1005089
You omitted the value for the resulting area of the square-formed rectangle after its changes.
Just calling this area, A,


L and w for original dimensions,
{{{L=w+3}}}
-
{{{(w+2)(L-1)=A}}}
{{{(w+2)(w+3-1)=A}}}
{{{(w+2)(w+2)=A}}}
{{{w+2=sqrt(A)}}}
{{{highlight_green(w=-2+sqrt(A))}}}  and this means {{{highlight_green(L=1+sqrt(A))}}}.


You can calculate the original perimeter.