India and China have agreed to work urgently to achieve the withdrawal of tens of thousands of troops stationed along their disputed border in a long-running standoff, India's government said.