Find all files (type f) with either a .txt or .log extension and execute the command 'sed -i 's/\d+/\&/g' {}' on each of them.
find / -type f \( -name '*.txt' -o -name '*.log' \) -exec sed -i 's/\d+/\&/g' {} \;