30% of number A means

similarly, 40% of number B means

These must be equal, so we have

Multiply both sides by 10 to get

So, you can choose any number for A, and then you multiply it by 4/3 to get B. There are infinitely many solutions to this equation.