Subtract the service charge from the total amount:
Rs 173 - Rs 50 = Rs 123.
Now, we have Rs 123 to spend on electricity.
Up to 20 units cost Rs 3 per unit, so for the first 20 units, it would be
20 units * Rs 3 = Rs 60.
Subtract this from the remaining amount:
Rs 123 - Rs 60 = Rs 63.
The cost for each unit beyond 20 is Rs 7. Divide the remaining amount by the cost per unit: Rs 63 / Rs 7 = 9 units.
Therefore, you can consume 20 + 9 = 29 units for Rs 173 with a service charge of Rs 50.