Search in the /home directory up to 3 levels deep for any files with the name ending in .txt and execute the command to replace string1 with string2 in each of those files.
find /home -maxdepth 3 -iname *.txt -exec sed -i 's/string1/string2/g' {} \;