Joining paths in illustrator

argh how do i join these two objects in illustrator?

Right now they are compound paths but when they overlap the overlapped part turns white.

So how do i delete the paths splitting the two objects and combine the objects?