Answer:
9 and 14
Explanation:
We know that the perimeter is equal to: 
P = 2l + 2w = 46 
If we divide by 2, we are left with: 
l + w = 23 
I = 23 - w 
Now the area is equal to: 
A = l * w = 126 
l * w = 126 
Now replacing it, we are left with: 
(23 - w) * (w) = 126 
(-w ^ 2) + 23 * w = 126 
Rearranging: 
w ^ 2 + -23 * w + 126 = 0 
We factor and we have: 
(w - 9) * (w - 14) = 0 
w - 9 = 0 => w = 9 
w - 14 = 0 => 2 = 14 
If w = 9, l = 23 - 9 = 14 
If w = 14, l = 23-14 = 9 
So the dimensions are 9 and 14.