If you are escorting someone without the appropriate “flight of two” callsign suffix, you are subject to being reported, if you’re in ATC-controlled airspace. “Flight of two” means you + the other aircraft are flying in formation (hence, a flight of two aircraft). You cannot randomly escort someone in controlled airspace - that’s a rather severe invasion of someone else’s flying experience. It’s an issue that’s been hotly discussed here on the IFC, with some people even arguing for it to be raised to a Level 3 violation.
However, if this was done with the approval of the other pilot and you both simply forgot to fly with the “flight of two” suffix, or if you feel that you were more than 3 NM away from the other pilot, you could try submitting an appeal to @appeals and see if they might reverse it.
Normal separation rules mandate 3 nautical miles separation between aircraft at all times.
There’s also a video tutorial by @Mark_Denton on how to perform formation flights properly - and can also apply to escorts. It’s a little old (2016), but still relevant, and is great to learn about how to use the “Flight of XX” command:
The other thing to keep in mind is that only one of the aircraft in a flight of X should be communicating with ATC. While the others can be on frequency, only a single clearance is issued for all aircraft.
As previously stated, both pilots need to agree to be a part of a formation flight. You can be reported if you break separation rules by escorting an aircraft that has not agreed to be in a formation flight.