Sorry to say, but there isn't an "exact way" to figure that puzzle.
The only way would be if you get the same starting combination as mine, and then you'd follow my steps from there.
But to be honest, that would be kinda hard. Your best bet is save in front of the puzzle thing, and keep resetting if you can't figure out.