An element X forms an oxide XO3, the valency of element X is:
+6
The compound XO3 has three atoms of oxygen.
Valency of an O atom = −2
Charge of three O atoms = −2×3 = −6
The compound needs to be electrically neutral, the valency of X should be +6.