Comparison of the effect of lanthanides (Ln), d-transition metals and selected metals of the main groups on the aromatic system of salicylic and benzoic acids