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.
Peter can build the letter X shape using a minimum of 5 unit cubes by utilizing shared cubes at the intersection. Each diagonal contributes 3 cubes, but they share 1 cube at the center. Therefore, the calculation shows that 5 cubes are needed in total.
;