6. Let's consider the first line (I) and first column (I) of the square (see fig. 1). As the sums of numbers on them are the same, and the first case of I line is common for them, then 1 + ? = 5 + 7. So, ? = 11. The same way, considering the diagonal and the column, marked on fig. 2, we can find the last case of II column: it is 13. Now, from the II line and II column (fig. 3) we have that, the last case of II line should be 17. As the central case of square is common for two diagonals, then the extremities of "empty diagonal" we'll fill such that, the sum of them will be equal to 18. So the sum of all numbers of I and III columns is 1 + 11 + 7 + 17 + 18 = 54. Now, it is clear, that the sum of the numbers of each line, column or diagonal this "Magic Square" should be 54 : 2 = 27. Using the last fact, we may easily fill remaining cases as in the fig. 4.
Fig. 1
Fig. 2
Fig. 3
Fig. 4