If then rules? I cant seem to figure out ver 4.0

So I want to check it a presence sensor arrives(a or b sensor), and if presence sensor is away (a or b)
(So one presence sensor must arrive and one sensor still needs to be away)

then if presence sensor (a) is present then do this, else if presence sensor (b) is present then do this, else do nothing.

(I want to have an announcement speak to who ever comes home first, as long as everyone else is gone.)

How can I do this. Need a walk through.

One thing to keep in mind, what if you arrive home together? One of your presence sensors is always going to "arrive" first, while the other is still away. It makes things a lot more complicated if you try to deal with that, but it's something to keep in mind when you are working through this.