From Chiang Mai go to Chiang Khong by bus (from Arcade bus station) or minivan (from town). There's a direct bus every morning at 830 or the vans run around 10am takes 6 hours. Or take any bus to Chiang Rai then connecting bus (note there are two stations in CR) to Chiang Khong. Laos 30-day visa on arrival costs $30-35USD for most nationalities. Stay in Chiang Khong or on the Laos side in Huay Xai a night then get slow boat to Luang Prabang (2 days) or bus via Luang Namtha, Oudomxai, to LP about 14 hours. Or there are speed boats that do the trip in 7 hours. From Luang Prabang or Vientiane you can fly to Hanoi in about an hour for around $160-180 or take the 24-hour nightmare bus.