How to align and split boxes along with calculations