Answer your own questions, come up with a figure. Oh and trial doesn't cost anything because the cost is a sunk cost already. Likewise appeals. The judges with their fat salaries, the court infrastructure, and judicial system employees are being paid for by the taxpayers regardless. There isn't any incremental cost associated with it. Incarceration is a real cost.
Just because the lawyers, judges, clerks, etc., are already on staff and paid does not make the cost of trial negligible. Anything those people do in conjunction with a trial is a cost. Plus, if anything extra had to be done—expert witnesses, etc., that drives the price higher.
Murder trials, it seems, cost anywhere from close to a hundred thousand up to millions.
Incarceration costs about 47,000 per year in CA (the only state I could find data).
This guy was a net cost saving to taxpayers, even with the ICU costs.