There's no solution. Uninstalling an app uninstalls its files. Unless the phone is already rooted, and you have a file undelete app already installed, you stand a good chance of overwriting the files you want back when you root and install an app. (And if you've been using the phone since you uninstalled it, they're probably already overwritten.)