I don't follow what you mean by changing the image removes the custom text. That said, I think this template will do what you want.
Code:
program:
'MerlinMama’s Library' & character('newline') & $#myrating & ' Stars — ' & $#myint & ' Pages'
You would use $#rating for $#myrating and $#pages for $#myint.
An alternate is
Code:
program:
'MerlinMama’s Library' & character('newline') & template('{#myrating} Stars — {#myint} Pages')