3/8 = x/40, so x = 40 ÷ 3 × 8 = 106.7
The wrong pair was joined together, so the 3 and the 8 swapped jobs.
Repair: Multiply the diagonals: 3 × 40 = 8x, so x = 15.
Solve a proportion with one unknown fourth term.
The method, result, and an independent check will appear here.
A calculator gives you the number. If you also want to be able to do this without one, ratios and proportions walks through the method step by step, with a worked example and the mistakes that cost marks.
A calculator can check the arithmetic; use the arithmetic subject guide to rebuild the method, arithmetic practice questions to test selection, and the math formula library to confirm conditions and notation.