The x equation of motion is v0cos(40°)tair = range (Solve for time in the air)
You now have tair which has the equation for a symmetric launch problem of 2v0sin(40°)/g = tair which allows you to solve for v0 (This equation is derived from -v0 = v0 -gtair)