.
This problem and this question both MAKE NO SENSE.
There are INFINITELY MANY possible answers.
For example, the dimensions can be
1 and 3x^2 + 5x -2;
1/2 and 2*(3x^2 + 5x - 2);
1/3 and 3*(3x^2 + 5x - 2),
and so on . . .
Or this, different series of expressions
(3x-1) and (x+2)
(1/2)*(3x-1) and 2*(x+2)
(1/3)*(3x-1) and 3*(x+2)
and so on . . .
It is a typical example of posing a "quasi-" and "pseudo-" problem/problems, which, actually, make no sense.