Since you are already calculating time differences, use the TEXT
function to format the time in hh:mm:ss
format rather than changing the format for the cells.
=TEXT(A1,"hh:mm:ss")
In your case your calculation formula should be,
=TEXT(your_calc_formula,"hh:mm:ss")