(i) Four things changed together between X and Y: the length (10 cm and 20 cm), the thickness (thin and thick), the number of cells, which changes the current (1 and 2), and the time (30 s and 60 s). The heat in a wire depends on all of these, so Y may have got hotter because of the extra cell or the longer time. He cannot tell which change caused it.
(ii) He should use two nichrome wires of the same thickness but different lengths, connect each to the same number of cells (the same battery), keep the switch ON for the same time (for example 30 s each), and measure the heating in the same way. Then length is the only thing that is different, and it is a fair test.