According to Baidu map query, it takes about 5 hours and 59 minutes to drive from Lincang to Xishuangbanna, passing through Tianhou Expressway and Kunmo Expressway.
You can also take the C382 train from Lincang to Ninger Station and get off at Mojiang Station, and take the D875 train and get off at Xishuangbanna Station. The whole journey takes about 6 hours and 34 minutes.