Step 1 :Let's denote the width of the rectangle as \(w\) and the length as \(l\). According to the problem, we have two equations:
Step 2 :\[l = 5w - 23\]
Step 3 :\[lw = 42\]
Step 4 :We can substitute the first equation into the second to solve for \(w\), and then substitute \(w\) back into the first equation to find \(l\).
Step 5 :Solving these equations gives us two possible solutions for \(w\): \(-\frac{7}{5}\) and \(6\).
Step 6 :However, the width of a rectangle cannot be negative, so we discard the negative solution and take \(w = 6\) as the correct solution.
Step 7 :Substituting \(w = 6\) back into the first equation, we find that \(l = 5*6 - 23 = 7\).
Step 8 :\[\boxed{\text{Final Answer: The width of the rectangle is 6 cm and the length is 7 cm.}}\]