FindRoot[x - 5 Cos[x] + 3 Sin[x] - 40 == 0, {x, 34}]