The entrance fee at Purple Dinosaur Carnival was 4 dollars each and each ride cost 80 cents.
Let the number of rides you went on be x.
4 + 0.8x= 12 + 0.3x
0.5x = 8
x = 16
You went on 16 rides.
4 + .8r = 12 + 0.3r
.5r = 8
r = 16