truvada used for prep was chosen as it has a charicteristic that it is not all absorbed in the gut so some of it is passed through the rectum. this allows a stronger concentration of meds in the risk area. an sti causes more white cells to be around the area of sti infection so these again can help to fight hiv in semen. a down side is the area of infection can make an easier pathway into the body for hiv.so its a sort of no real answer but the odds are aginst hiv. drug use lowers the immune sytem effectivness,even poppers do that.now again if youve followed prep instructions then the theory is that the prep gaurds against lowered immune sytem response. trouble is how much drugs knock the immune system down to where prep is fighting the battle alone. dont know if u know how prep works.it blocks only one of the prosseses that hiv has to go through to reproduce,but uses 2 similar drugs to double block the process.now when ur neg theres no hiv in ur blood, when u get hiv semen in u its first blocked by the body and prep in ur arse. should any get passed that lot into the blood stream its almost in uber small amounts and the immune white cells and prep blocking the process get rid of it. but if u do drugs and sti and other stuff you stand the chance of raising the hiv levels in ur blood(things like if you plug drugs) to a point where drug resistance can happen. just as a note,drug resistance can happen through natural mutation of hiv. currently there are 45/48 mutation types of hiv1 recognized.
oh yeh forgot to say it would also depend on who he had sex with as in if it was a guy on meds then uber low amount of hiv in semen. on the other hand if the guy was high vl say in the millions then u have more hiv in the semen to do battle with.