According to the investigation reported by local Chinese News:
The engines on the 738 of FU are CFM56-7B24E. The high pressure foam went into the engine core when the engine was running. Due to thermal shock, some blades were deformed, the oil pipes and electronic components might have also been affected. Both engines were expected to be written off.
Also, despite of the smoke from the engine on the CA airplane, foam was not actually needed.