On the nature of ferroelectricity in Sr1−xAxTiO3 and KTa1−xNbxO3 solid solutions