So the word 'like' is able to go before both nouns? What other cases does this happen in German sentences?
This is only possible since the syntax here is a question-structure. Liest du gerne? - Do you like to read? Spielst du gerne Schach? - Do you like to play chess? In a question which is formed like that, you put the verb in the very beginning.