Need help with this logic

I am stuck with a logic problem here. I did a lot of thinking but I cant come up with a solution. So this application displays a table, My task was to add another table(BOTTOM) similar to one already...