well if it was that easy.. id would be done since long time..

what you did.. will only work if you switch safe mode on..
if the original userid is 2458 and the target userid is 1288, you would now (after what you did.. ) find the file in the directory gallery/files/2/4/5/8 and copy the thumbnail, the file and the original file to directory gallery/files/1/2/8/8 .. then the files will show up.... the hard thing is to make this work independently for safe-mode settings (all files in one directory)
Luc