Validate against duplicate entries within nested repeats

hello I am somewhat stuck in this formula I hope you can help me I will be very grateful
Help modifying formula