Romans 8:28 (NKJV)
The end result of something is always more significant than the process itself. For example, you may have a task to accomplish and it turns out that you find a way to do it that was different than what you had done before, but you still achieved the desired result. Or, when you are taking a trip to some place, the route you travel is not as important as reaching the destination is. If in the process of doing something we find ourselves doing something we did not expect, or traveling down a road that we originally thought we would not be on, would it matter if we had the right result and reached our intended destination?
Some people have the idea that God somehow controls everything so they just say that God will always work things out, some way or somehow. However, this is not entirely accurate, because God is not some great puppet-master in the sky controlling every detail of our life. But, God is actively working in our lives and no matter what may come our way He will help us and guide us to what we need to have and where we need to be. We can be sure that God will help us work everything out, but that does not mean that things will always work out the way that we think they will.
What often happens when we face a difficult situation is that we begin to think about what the answer might be and how we can we can work things out. But, we either do, or should realize, that we do not know everything. With our limited knowledge and understanding it will never be possible for us to figure out everything and know exactly what to do and how to work things out each and every time. This is where we must put our trust in God and allow Him to direct us and show us what to do to find the answers and solutions that we need, which may not at all be what we had expected.