Alice and bob problem

Help me with this