-- Cost of one child's ticket = 2 x 1.
Cost of 2 children's tickets = 2 x 2
Cost of 3 children's tickets = 2 x 3
Cost of 5 children's tickets = 2 x 5
.
Cost of 'c' children's tickets = 2 c .
-- Cost of one adult's ticket = 6 x 1.
Cost of 2 adult's tickets = 6 x 2
Cost of 3 adult's tickets = 6 x 3
Cost of 5 adult's tickets = 6 x 5
.
Cost of 'a' adult's tickets = 6 a .
-- Total cost of tickets for 'a' adults and 'c' children = 6a + 2c .
The question tells us the ride collected a total of $148,
so
6a + 2c = 148 .
-- The number of adults who bought tickets was 'a' .
The number of children who bought tickets was 'c' .
The number of dogs who bought tickets was zero.
The total number of tickets sold was a + c .
The question tells us that 38 tickets were sold,
so
a + c = 38 .