Explanation:
3.5 hours for 1 cake means 3.5 hours per cake.
similar : 2 hours for 1 pie means 2 hours per pie.
so, if there are e.g. 3 pies, they take 3×2 = 6 hours.
therefore the general constraint is
3.5x1 + 2x2 <= 70
I think the names "x1" and "x2" are confusing when writing this inequality.
I prefer to use x and y.
and then it would look like
3.5x + 2y <= 70