Using your dimensions (8, 3), I got expressions for two volumes, each involving a variable x.

Equating the volumes and simplifying resulted in the following.

x*(3*x - 16) = 0

Hence: x = 0 and x = 16/3 solve the problem with the dimensions you originally posted.