That code, as present above, runs when the browser reads/renders the HTML. It won't do what you expect.
First, you need to mentally separate your web server generating (maybe dynamic) HTML, your browser initially rendering the received HTML, and javascript modifying the rendered HTML later. They are three distinct things in three distinct environments (scopes). Once the HTML is generated and sent, the server no longer has any part in the process; in fact, the server's context vanishes. Once the browser finishes rendering the HTML, the document is 'closed'; nothing more can be written to (appended to) it. At this point, you may only use JavaScript to add, delete and change contents of the DOM (elements of the display). That means that the tags in your initial HTML must contain sufficient ID and/or name elements so that you can locate the elements you want to change. Look up "getElementById()".
It took me quite some time to consistently separate the three environs in my head and keep them separated.
Second, you need a predefined comment field with an ID or a name and perhaps containing something like "Membership included ($25)".
Third, you need an 'onchange' item in your radiobutton definition that will call a function that changes the innerHTML of the comment item above.
Fourth, you need to rewrite your JS as a function that the above 'onchange' element calls when the radiobutton changes.