A rental car costs $40 per day and an additional 50 cents per mile for every mile driven over 176 miles each day. Assuming that at least 175 miles are driven each day, the formula below shows how to calculate the total cost of renting a car, based on the number of days the car is rented and the number of miles driven. In the formula, c represents the total cost, m represents the total number of miles driven and d represents the number of days the care is rented.
c = 40d + 0.50 (m - 176d)
Which of the following is an equivalent formula, solved for m in terms of c and d?