Let x be the width of the rectangle.
We know that the length of the rectangle is three less that three times its width, this can be express as:
[tex]3x-3[/tex]Now, the area of a rectangle is:
[tex]A=lw[/tex]Plugging the value of the area and the expression for the width and lenght we have the equations:
[tex]x(3x-3)=126[/tex]Solving for x we have:
[tex]\begin{gathered} x(3x-3)=126 \\ 3x^2-3x-126=0 \\ x^2-x-42=0 \\ (x-7)(x+6)=0 \\ \text{then } \\ x=7 \\ \text{ or} \\ x=-6 \end{gathered}[/tex]Since a distance is always positive we conclude that x=7.
Now that we know the value of x we plug it in the expression for the length, then we have:
[tex]3(7)-3=21-3=18[/tex]Therefore the lenght is 18 inches and the width is 7 inches.