A company owns two dealerships, both of which sell cars and trucks. The first dealership sells a total of 164 cars and trucks. The second dealership sells twice as many cars and half as many trucks as the first dealership, and sells a total of 229 cars and trucks.

An equation for the total cars and trucks for dealership A:
x + y = 164

An equation for the total cars and trucks for dealership B:

How many cars did dealership A sell?

How many trucks did the dealership B sell?

For dealership B, let's use variables to represent the number of cars and trucks sold:

Let x be the number of cars sold at dealership B
Let y be the number of trucks sold at dealership B

We know that dealership B sold a total of 229 cars and trucks, so:
x + y = 229

We also know that dealership B sold twice as many cars as dealership A. Let's use c to represent the number of cars sold at dealership A. Then:
x = 2c

Finally, we know that dealership B sold half as many trucks as dealership A. Let's use t to represent the number of trucks sold at dealership A. Then:
y = 0.5t

Now we can substitute these expressions for x and y into the equation x + y = 229:
2c + 0.5t = 229

We also know that dealership A sold a total of 164 cars and trucks, so:
c + t = 164

To find the number of cars sold at dealership A, we can solve for c in the second equation:
c = 164 - t

Then we can substitute this expression for c into the first equation:
2(164 - t) + 0.5t = 229

Simplifying this equation:
328 - 2t + 0.5t = 229
-1.5t = -99
t = 66

So dealership A sold 98 cars (since c + t = 164), and dealership B sold 2c = 2(98) = 196 cars and 0.5t = 0.5(66) = 33 trucks.