How to find nodes with a scalar predicate having values found during traversal

Can you show what you did, your answer confused me a bit.