return a key of a node with maximum value within a range of keys in B+ tree
Augment each node to contain the key of the node with maximum value, among all nodes that are underneath it (among all of its descendants).  You can easily maintain/update this augmented information each time you modify the tree, by using the fact that the maximum for any node can be recomputed using just the information in its direct children (you don't need to look at its grandchildren etc.).

Now any range can be expressed as the union of $O(\log n)$ subtrees.  In other words, you can find $O(\log n)$ nodes such that their descendants cover the range exactly.  So, the max value of any node within that range can be obtained by looking at the values in those nodes, and taking the max of them.  In this way each query can be answered in $O(\log n)$ time.