You should be able to make it with the Search function.
Assuming the TextInput is named as TextInput1, outer gallery is named as Gallery1, Inner is Gallery2.
To have the same string searched within each Gallery, under the items property of each, input the formula below:
Items property for Gallery1 (Assuming Table1 is for Gallery1, with Column1, Column2,.....):
Search(Table1, TextInput1.Text, Column1, Column2 ...)
Items property for Gallery2 (Assuming Table2 is for Gallery2, which has Column3, column4 ....):
Search(Table2, TextInput1.Text, Column3, Column4...)
For the Search function, see:
Filter, Search, And Lookup functions in PowerApps
Regards,
Michael