Not being an engineer, I can only hazard a guess. Perhaps a new engine design was being tested to be used on a new plane like the 787 if not the 747 itself.
As best I can tell:
The top aircraft is owned by GE, and testing the GEnx engine for the 787.
The lower aircraft is owned by Rolls Royce, and is testing an engine for the 777.