How to persist selection of foreign key in related table
Currently you have something like this, as unusual as it may seem.

user {USR}
  PK {USR}

genre {GNR}
   PK {GNR}

book {BOK, GNR}
  PK {BOK}
  FK {GNR} REFERENCES genre {GNR}

preference {USR, BOK}
        PK {USR}
       FK1 {USR} REFERENCES user {USR}
       FK2 {BOK} REFERENCES book {BOK}




For the stated requirement:

user {USR}
  PK {USR}


genre {GNR}
   PK {GNR}


book {BOK, GNR}
  PK {BOK}
  SK {BOK, GNR}

  FK {GNR} REFERENCES genre {GNR}


pref_genre {USR, GNR}
        PK {USR}
        SK {USR, GNR}

       FK1 {USR} REFERENCES user  {USR}
       FK2 {GNR} REFERENCES genre {GNR}


pref_book {USR, BOK, GNR}
       PK {USR}

      FK1 {USR, GNR} REFERENCES pref_genre {USR, GNR}
      FK2 {BOK, GNR} REFERENCES book       {BOK, GNR}


And if you want to allow more than one preference for each user, just change keys on pref_:

pref_genre {USR, GNR}
        PK {USR, GNR}

       FK1 {USR} REFERENCES user  {USR}
       FK2 {GNR} REFERENCES genre {GNR}


pref_book {USR, BOK, GNR}
       PK {USR, BOK}

      FK1 {USR, GNR} REFERENCES pref_genre {USR, GNR}
      FK2 {BOK, GNR} REFERENCES book       {BOK, GNR}




Note:

All attributes (columns) NOT NULL

PK = Primary Key
AK = Alternate Key   (Unique)
SK = Proper Superkey (Unique)
FK = Foreign Key