Since we have to make sum of 3 rows, 3 columns and 2 diagonals equal, the sum has to be 15 because 15 is the only number which can be written as sum of 3 distinct numbers in 8 ways.
The possible cases are (1,5,9) (1,6,8) (2,4,9) (2,5,8) (2,6,7) (3,4,8) (3,5,7) (4,5,6) .
Now value of ‘e’ must be in 4 distinct combinations
i.e., a + e + i = 15
c + e + g = 15
d + e + f = 15
b + e + h = 15
Only 5 occurs in 4 combinations i.e., (1,5,9) (2,5,8) (4,5,6) (3,5,7)
Therefore, value of e = 5.