I need to complete the grid with the numbers 1-9 and work out what the missing numbers are in the gray squares.

But I don't know the rules of the game, can someone please explain to me how it works?
The complete line of numbers cant have the same number in it twice or what?