Answer
$NiI_{2}$
Work Step by Step
Convert the mass of each constituent element into moles by dividing by its molar mass:
$1.245g\ Ni\times\frac{1mol}{58.693g}=0.02121mol\ Ni$
$5.381g\ I\times\frac{1mol}{126.90g}=0.04240mol\ I$
Formulas have whole number subscripts so divide all the amounts by the smallest and round if the number is really close. Then multiply by whatever factor makes them all a whole number or very close to a whole number.
$\frac{0.02121mol\ Ni}{0.02121}=1$
$\frac{0.04240mol\ I}{0.02121}=2$
So the empirical formula for this compound is:
$NiI_{2}$