Epistasis Involving Multiple Loci
After reading Satwik Pasani's comment to the original problem, I tried using the hypostatic locus as the common locus in the epistatic relationships, instead of the locus causing the onions to be white.  The following solution fits the answers supplied in the book.

Three loci can be used to determine the colors of the onion, the alleles of which can be denoted by C, D, and E.  Suppose that C and D are each epistatic to E, such that the phontypes of the onion are given as:

cc---- white
--D--- white
C-ddE- red
C-ddee yellow


Then the first crossing in the problem can be given by CCDDEE x CCddee.  The second crossing could be ccddee x CCddEE.