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:
![3x-3](https://img.qammunity.org/2023/formulas/mathematics/college/fx3tsdn0a5safu75mqh2d7fhc179ey3lur.png)
Now, the area of a rectangle is:
![A=lw](https://img.qammunity.org/2023/formulas/mathematics/college/1uev9eqrb6cie54zfnubw0e3j6pmkw3cu2.png)
Plugging the value of the area and the expression for the width and lenght we have the equations:
![x(3x-3)=126](https://img.qammunity.org/2023/formulas/mathematics/college/s23uw43xcdvjb0gzb0t5mz9v8iyip26wac.png)
Solving for x we have:
![\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}](https://img.qammunity.org/2023/formulas/mathematics/college/7n5rvheu9flrh3txc9zm1bnrv1gqg5fxry.png)
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:
![3(7)-3=21-3=18](https://img.qammunity.org/2023/formulas/mathematics/college/z12v14lob6xlt3o3w5xehpuhjpyqk64w40.png)
Therefore the lenght is 18 inches and the width is 7 inches.