The best I can do for you is this:
From the second equation, if we take ln of both sides:
ln(n^x) = ln(4)
x ln(n) = ln(4)
x = ln(4)/ln(n)
Insert this into the first equation:
[ln(4)/ln(n)]^n = 12
This is, at least, an equation in one variable. Supposedly you can solve this numerically.
-Dan