Assume 100 g of the compound is present. This converts the percentages into mass. Then, calculate moles of each element:
Ca ---> 36.1 g / 40.08 g/mol = 0.9007
Cl ---> 63.9 g / 35.453 g/mol = 1.802
Next, look for the lowest whole-number ratio. We do this by dividing by the smallest value:
Ca ---> 0.9007 / 0.9007 = 1
Cl ---> 1.802 / 0.9007 = 2
The empirical formula is CaCl2