Tree search returning parents and children
Given a tree, expressed with parent pointers, you can easily add child pointers: just traverse all nodes, and when you encounter a node $n$, look up its parent $p$, then add a child pointer from $p$ to $n$.

Given a tree and a search condition, you can find all matches by iterating over all nodes to see which ones satisfy the search condition.  If you've augmented the tree to contain both parent pointers and child pointers, for each matching node, you can return its parent and its children using those pointers.