I think there is a thing called developer capital. In its simplest form it is when you help somebody with something, be it a PR review or a bug in a piece of code then you build up a bit of capital, or brownie points if you will.
The next time you're having an issue this somebody, to some greater or lesser extent, feels a bit indebted to you and so they will offer to help. How do I know this? Well that is how I often feel. Its essentially the you scratch my back and I'll scratch yours of the coding world.
There is however a problem. Developers tend to be on different levels and so generally speaking I can help somebody who knows a little less than I do, but will struggle to help somebody who knows more. When I'm having fun with a tricky bug, then I generally need somebody who knows more than me to help.
Now you might think that might cause a bit of an imbalance as you have no way of building up capital with the person who knows more than you. Essentially the capital only flows in one direction, from the person who knows the most to the person that knows the least.
Once you know this it is easy as you just have to always help the person who knows less than you and have some trust in the system that somebody that knows more than you will help you.