There are two options: either you closed the assumption 2 in step 6 or you did not. There is a variant of ND where you have to close all open assumptions A when you use implication introduction to derive A -> B, and there is a variant where you can close any number, including zero, of such assumptions. The latter variant is more prevalent. If you closed 2 in step 6 (which is probably the case because of the rectangle), then you can't use it in step 7. If you did not close it, then 2 is still open at the end.

I think it is clearer to say that P is stronger than Q if P implies Q.2) We say that "statement P is stronger than statement Q" if Q is true whenever P is true, but not conversely.

If a program made 15 steps, then B is false, contrary to what you wrote. It is clear that if a program terminates within a day, then it terminates within a year.

For the last question, it is incorrect to write B ⊂ A because B and A are propositions, not sets. (Some textbooks use ⊃ to denote implication, but in any case it should be different from set inclusion.) You write that when the return value is -1, A is true and B is false. Therefore, A does not imply B, which means that A is not stronger than B.

Note, by the way, that falsehood (or a contradiction) is the strongest possible proposition because it implies everything. Similarly, a tautology is the weakest proposition because it is implied by everything.