Hi engchai Ang,
I guess you have tried your best to do it. Refer to my code, paste this code in your callback function
a = app.Input1EditField.Value;
b = app.Input2EditField.Value;
if a>=10 || b>=10
app.Lamp.Color = [1 0 0]
app.Lamp.Color = [0 1 0]
However, I have attached a .m file for you.
.mlapp file is not allowed to be uploaded here. Hence, i copy the code and paste it in .m file for you.