Hey there! I would be glad to help you out.
For the first two miles, the price would be six dollars total.
For every mile after that, you would be charged two dollars.
Assuming that you travel 8 miles, you would have to pay six dollars for the first two miles (3*2), and twelve dollars for the last six miles, totaling eighteen dollars.
So the price of an eight mile ride would be eighteen dollars.
You can use this logic for the 50 miles trip too. After traveling 2 miles ($6), there will be 48 more miles.
For these 48 miles, it'll only charge you two dollars each, which would total 96 dollars.
So the price of a fifty mile ride would total $102.
I wish you luck on your homework!