What number should replace the question mark in the grid?

The answer is 4.

Solution:

In right side, sum of two numbers.

8+1 = 9 3+5 = 8 4+3 = 7 6+2 = 8

then,

5+? = 9 5+4 = 9