When a positive integer N is written in base 9, it is a two-digit number. Say N in base 9 has digits x, y: that is, N = 9*x+y. When 6N is written in base 7, it is a three-digit number obtained from the two-digit number by writing digit 4 to its right. That is, 6N in base 7 has digits x,y,4: that is, 6N = 7^2*x + 7*y + 4. Two equation in three unknowns, but we do know that 1 <= x <= 6 and 0 <= y <= 6. 7N = 63x + 7y, Subtracting, N = 14x - 4. So 14x-4 = 9x+y and so 5x = y+4. You can now easily find the possible values of x and y which satisfy the inequalities: there are two possible answers.