I had a problem like this when I had this lab in school. Couple years to follow a simple thought process of how to write it could be changed.

A method you can try is like this:
1. input your data into 1st 7seg
2. take the old data from 1st 7seg and put into 2nd 7seg.
3. so forth

Doing this you will have 3 var that will store the information that does travel from one 7seg to the next. That is something you have to figure for you program. Draw it out then write it out.