We know that the sum of any side in a magic triangle is equal.
The sum of the completely filled side i s
5 + 6+ 8 + 1 = 20
Now the next row will be
1 + 3 + 7 + x = 20
So the missing number is 9.
Similarly, the last line needs two numbers and the sum of two numbers should be 20 - (5+9) = 6
Writng it as 2 number sbetween 1-9 we can write it as 4+2 since they are the only numbers missing. The order of 4 and 2 does not matter here as they are in the same line.