Hint – Assume fixed charges and per km charges as two different variables .Now total cost is the sum of fixed charges and variable charges.
Let, the fixed charge be x Rs.
And let the per km charge be y Rs.
Now, it is given that for a journey of 12 km, the charges paid is Rs. 89.
$ \Rightarrow x + 12y = 89................\left( 1 \right)$
And also it is given that for a journey of 20 km the charge paid is Rs. 145.
$ \Rightarrow x + 20y = 145................\left( 2 \right)$
Subtract equation (1) from equation (2)
\Rightarrow x + 20y - x - 12y = 145 - 89 \\
\Rightarrow 8y = 56 \\
\Rightarrow y = 7 \\
So, per km charge is 7 Rs.
Now, from equation (1)
x + 12y = 89 \\
\Rightarrow x + 12 \times 7 = 89 \\
\Rightarrow x = 89 - 84 = 5 \\
So, fixed charges are 5 Rs.
Now we have to calculate what a person will have to pay for travelling a distance of 30km.
\Rightarrow x + 30y \\
= 5 + 30 \times 7 = 5 + 210 = 215 \\
Thus the person will have to pay 215 Rs. for travelling a distance of 30km.
Note – whenever we face such types of problems first construct the linear equations according to given information after that solve these equations and calculate the values of fixed and variable charges then we easily calculate how much a person will have to pay for travelling a distance of 30km.