You want the largest SQUARE floor then both of the sides have to be the same. Since one gallon can cover up 144 square feet, to work out the dimensions you have to find the square root of 144 which is 12. So the largest square floor it can cover has dimensions 12x12 feet.
Hope this helped :)