Substitute the two jobs in y=ax+b:
580=2a+band1030=5a+b
From the first, b=580−2a. Substitute this in the second:
1030=5a+580−2a=3a+580
3a=450,a=150
Then b=580−2×150=280. So y=150x+280. Check: 150×5+280=1030.
Here a=150 is the charge per hour (₹150 for each hour) and b=280 is the fixed visiting fee of ₹280.
For 3.5 hours:
y=150×3.5+280=525+280=805
The charge is ₹805.