Malonic ester is a beta diester. Therefore its alpha hydrogen is extremely acidic. Treatment of malonic ester (ROOCCH2COOR) yields ROOCCHCOOR- where the alpha carbon is deprotonated. Adding ethyl bromide leads to a SN2 reactions between the alpha deprotonated beta diester and the ethyl group yielding an ethyl substituent on your original malonic ester between the two ester groups.
Adding 2,2-diaminopropane will cause one of the amino groups to undergo nucleophilic attack at one of the carbonyl carbons, displacing the alkoxide leaving group. That alkoxide deprotonates the NH2+. The other NH2 is still free for nucleophilic attack. Therefore, it will attack the other carbonyl carbon and displace the other alkoxide leaving group, followed by alkoxide deprotonation. Thus, you get answer (B).
If you look at answer (B), you can see the 2,2-diaminopropane in the upper half of the compound. It has clearly undergone intramolecular ring closure with its two amino groups and the malonic ester. You can see the alpha ethylation of your malonic ester from your treatment with base (KOH) and ethyl bromide.