In b4a the 'controls' (labels, buttons and almost everything) need to be initialized before you van use them.
Only if you use the Designer you don't need to initialize them (the designer performs it for you).
If you used the layout from the first program there is an EditText view called edtResult.
This view should be replaced by a Label in the second program.
I suppose that you didn't replace it in the Designer or you didn't change its name from edtResult to lblResult.
Look at pages 40 and 41 in the Beginner's Guide.