X letter is formed by two lines. The minimum amount of cubes that one side may have to look a line that cross other line is 3, but given that one cube is shared by the two lines you only need 5 cubes. So the answer is that the fewest unit cubes that Peter can use to build the figue in the shpe of X is 5 cubes.