Answer: Magnesium turns red litmus blue and sulphur turns blue litmus red.
Step-by-step explanation:
When a metal reacts with oxygen present in air, it forms basic oxide which simply means when they react with water, they form basic solution.
The chemical equation for the burning of magnesium (metal) in air and reaction with water of the product so formed are as follows:


When a non- metal reacts with oxygen present in air, it forms acidic oxide which simply means when they react with water, they form acidic solution.
The chemical equation for the burning of sulphur (non-metal) in air and reaction with water of the product so formed are as follows:


There are 2 types of litmus:
- Red litmus: They turn the solution blue when dipped in basic solution.
- Blue litmus: They turn the solution red when dipped in acidic solution.
Therefore, here, magnesium forms a basic solution, therefore it will turn red litmus blue whereas sulphur forms an acidic solution, so it will turn blue litmus red.