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

0.4^x = 343

0.4^x = 343

(2/5)^x = 343
log both sides, with base 2

log2(2/5)^x =log2 343 = log2 7^3
x(log2 2 - log2 5) = 3log7 ------- #1

now 2^a = 5 ---> log25 = a
and 2^b = 7 ---> log27 = b

back in #1
x(log22 - log25 = 3log27
x(1 - a) = 3b

x = 3b/(1-a)