Great question! Seeing as @reosarevok has already covered the MusicBrainz part of how to do this, I’ll only explain the BookBrainz one.
For your second example just create a new Creator on BookBrainz and add an identifier of type “MusicBrainz Artist ID” with the artist’s MBID.
That ID is the unique combination of letters and numbers, separated by hyphens, behind “/artist/” in the URL of the artist’s MusicBrainz page, e.g. “8e494408-8620-4c6a-82c2-c2ca4a1e4f12” for Lorde.
Your first question is a bit more difficult as we haven’t worked out notability requirements for adding Creators that didn’t create any written publications but are required as intermediaries or to link to MB.
In this example with the musician being closely related to the author I think adding a Creator is justified though.