Nd3+, Eu3+, and Gd3+ ions as local probes in the NaxSr3−2xLnx(PO4)2 and KCaLn(PO4)2 rare earth phosphates