Element Table Hydrogen

If they give you the formula of the compound it forms with Hydrogen?
If someone gave you a table with elements substituted with other symbols and they show you the formula of the compound it makes with Hydrogen,e.g. XH3 (with X being an “unknown”, like in algebra) what can I deduce from just this formula? The valence electrons of X?
The valency of X would be 3. It would be written
2X + 3H2 = 2XH3
This would be called a metal hydride. Note that the ion is H-
SCIENCE-FUSION (1 of 7) SOLIGA element card game