The melody part I am not sure of, someone with more BIAB experience than I can answer that.

For the guitar solo if you right click on the first bar and open Bar Settings (I believe not at my PC) you will see your instruments listed there. Theere are drop down windows for each one, pick your guitar track and sel;ect mute. This will mute the track till you tell it otherwise.

Then go 4th last bar (or whichever one you want to add the guitar back in) and do the same right click, Bar Settings. Chose your track again and selec, back to normal. This will put your guitar back in at that track until the end.