Study of the electronic states and local environments of iron impurities in litium niobateand lanthanum hexaboride