Question 1065330
l,w = length, width, respectively
  {{{  2l+2w = 42 }}}    (1)
  {{{ sqrt(l^2+w^2) = 15 }}}  (2)

(1) —> {{{l + w = 21 }}} —> {{{ l = 21-w }}}

Square both sides of (2):
          {{{ l^2 + w^2 = 225 }}}

Now substitute "21-w" for "l"  in this last expression:
          {{{ (21-w)^2 + w^2 = 225 }}}
          {{{ (441-21w-21w+w^2) + w^2 = 225 }}}
Combine like terms, and rearrange:
          {{{  2w^2 - 42w + 216 = 0 }}}
Divide through by 2:
          {{{  w^2 - 21w + 108 = 0 }}}
Factor:
          {{{  (w-9)(w-12) = 0 }}}
       w = 9  or w = 12

If w = 9, (1) tells us l = 12
if w = 12, (1) tells us l = 9   (<<< discard because convention is l>w for a rectangle)

—
Ans:
     {{{ highlight( length = 12cm)}}},  {{{ highlight(width = 9cm ) }}}
—
Check:
      Diagonal = {{{sqrt(12^2 + 9^2) = sqrt(144+81) = sqrt(225) = 15 }}}  (ok)
      Perimeter = {{{ 2l+2w = 2(12) + 2(9) = 24+18 = 42 }}} (ok)