Let's consider the first case and restrict for a moment to the case where g is a generator of the group. Write $x = g^e$

So we can write a term:

$A^i x^j = x^i g^{ix} x^j = g^{ix + e(i+j)}$

If I can find an equation of the form

$A^i x^j = A^k x^l$

then we can rewrite this as

$ix + e(i+j) = kx + e(k+l) \mod p$

Now rather than solving for $x$ alone, solve for both $x$ and $e$ by finding two such relations and doing linear algebra over $\mathbb{F}_p.$

How long should it take to find such relations? Well, you can do it in $O(\sqrt p)$, by the "birthday paradox" or practically, say by Floyd's cycle finding method.

So whether or not you *reduce* the problem to discrete log, you can use the same methods to solve it and we should expect the difficulty to be within a constant factor of discrete log.

You can play the same kind of game with the second problem. Have fun!