Step 1: Recall the litmus rule.
Red litmus turning blue is the standard sign of a basic substance, just as blue litmus turning red signals an acidic one.
Step 2: Connect basic oxides to their source elements.
Metals, when they burn or react with oxygen, form metal oxides, and these oxides are basic in nature. For example: \[ 2Mg + O_2 \to 2MgO,\qquad MgO + H_2O \to Mg(OH)_2 \] Dissolving in water gives a basic hydroxide, which turns red litmus blue.
Step 3: Contrast with non-metals.
Non-metal oxides go the other way, they are acidic and would turn blue litmus red, the opposite of what is described here. So the described behaviour rules out $X$ being a non-metal.
Step 4: Conclude.
Since the oxide of $X$ is basic, $X$ must be a metal. \[ \boxed{\text{X is a metal}} \]