help with - 2 digit 7 segment display and 2 74hc595

I don't think I understand...can you give me an example on how can I change the code to make it better?