First, you should name the polyatomic cation, and then you should name the polyatomic anion. For example, NaOH becomes sodium hydroxide.
Writing Binary-Molecular Covalent Compounds
In order to write binary-molecular covalent compounds, you should write the name of the first element. When writing the second element, include the prefix -ide. For example, Mg(OH)2 becomes magnesium hydroxide.
Alkanes
In order to name and write a formula for an alkane, you first need to consider whether the compound is an alkane or not by deciding whether it fits the formula of (Cn+12n-2), and then you need to consider the organic prefix needed. For example, CH4 becomes methane.