Well it is time to have someone take a look. In version 7.5.7 the correct line should be
$function = "resize_image_{$config['GRAPHICS_LIBRARY']}";
I have no clue as to why you would have changed it to
$function = "resize_image{$config['GRAPHICS_LIBRARY']}";
It could be you did not use a proper editor on that file and you have some extra formatting insertied in the file that php does not like.
I would completely overwrite that file with a virgin copy..