Adaptation of urban inhabitants in the processes of social change