Cap number is $72,046,273, without Hayward, assuming all cap holds are dispensed with (Yabusele stashed, Green, Jerebko and Young renounced).
Hayward's $29,727,900 would take the cap number to $101,774,173, which exceeds the cap by $2,681,173. Releasing Mickey saves $655,767, which reduces the overage to $2,025,406.
Trading Rozier and Jackson would save $1,742,040, which reduces the overage to $283,366. As noted in the Bernardoni article, trading Rozier and Jackson to UTA in a sign-and-trade with Hayward would allow Hayward's salary to replace one of the traded players which would save an additional $815,615 and keep the Celtics under the cap.
The short answer to finn's question is that BOS only needs to send to UTA that amount of salary that will leave both teams under the cap. In this case, under the assumptions described above, that amount is approx. $2.025mm, plus $815k for each net player sent to UTA.