Let 2^a = 5 and 2^b = 3. Using exponent rules, solve the equation in terms of a and b.

0.4^x = 27

27 = .4^x

3^3 = .4^x
(2^b)^3 = .4^x
2^(3b) = (2/5)^x
2^(3b) = (2/(2^a))^x
2^(3b) = 2^x / 2^(ax)
2^(3b) 2^(ax) = 2^x
2^(3b+ax) = 2^x

3b + ax = x
x-ax = 3b
x(1-a) = 3b
x = 3b/(1-a)