Relational algebra query for question 1 :
πsname (S3 natural join (R2 natural join σcolor = "Red" V color = "Green"(B1)).
Here first we extract those bid's whose color is red or green then do natural join with R2 to find those sids which have the desired bids found in the earlier step then joining with S3 to get the corresponding names of the extracted sids and finally displaying the names of sailors using projection..
Relational algebra query for question 2 :
For this query to perform we need 2 instances of the table "reserves" so as to find an sid instance which has two different bids..Hence here we need rename operation as well..Then doing natural join with sailors to get the names..Hence the query can be written as :
πsname(S3 natural join πsid(R2 conditional join(condition is sid = S ^ bid != B) ρS,B,D(R2)))