The distances between the given points are the length (l), width (w), and diagonal (d).
The distance between the three corners is:
The diagonal is the longest distance and the width is the shortest distance, which means and .
The perimeter of a rectangle is .
Add and .
Multiply by .