are you referring to when kakashi was rock climging and opened a gate to get up the last part of the hill? correct me if i'm wrong but it looked to me like thats what he did. but kakashi already had knowledge of the gates so i don't think he had to learn that from lee