I couldn't fit the whole question in the title so here it is re-typed.
Let $k$ and $w$ be digits and let $X$ be some positive integer with one or more digits. Using the two digits, $kw_7$ is a two-digit base 7 number and $wk_9$ is a two-digit base 9 number. Then $kw_7 = wk_9 = X_8$. Determine the value of the integer $X$. You do not have to include base 8 in your answer.
First off I am very confused about how to even approach this problem. It is from one of my old math contests and I was wondering how to solve it since I got it wrong. I was first thinking of swapping everything to base 10 but there are not actual numbers to do so. Could someone help me out? Thank You. (Not sure about the tag too)