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.

Let's call the number of cars sold by the first dealership C1 and the number of trucks sold T1.

Given that the first dealership sells a total of 164 cars and trucks, we can write the equation:
C1 + T1 = 164

The second dealership sells twice as many cars as the first dealership, so the number of cars sold by the second dealership is 2C1. The second dealership also sells half as many trucks as the first dealership, so the number of trucks sold by the second dealership is (1/2)T1.

Given that the second dealership sells a total of 229 cars and trucks, we can write the equation:
2C1 + (1/2)T1 = 229

To solve this system of equations, we can first eliminate the variable T1 by multiplying the first equation by 2:
2(C1 + T1) = 2(164)
2C1 + 2T1 = 328

Now we can substitute this expression for 2T1 in the second equation:
2C1 + (1/2)T1 = 229
2C1 + (1/2)(164 - C1) = 229
2C1 + 82 - (1/2)C1 = 229
(3/2)C1 + 82 = 229
(3/2)C1 = 229 - 82
(3/2)C1 = 147
3C1 = 294
C1 = 294/3
C1 = 98

Now we can substitute this value for C1 in the first equation to find T1:
98 + T1 = 164
T1 = 164 - 98
T1 = 66

Therefore, the first dealership sold 98 cars and 66 trucks, while the second dealership sold 196 cars and 33 trucks.

Let's solve this step-by-step.

Step 1: Let's say the number of cars sold by the first dealership is "C1" and the number of trucks sold by the first dealership is "T1".
According to the given information, the total number of cars and trucks sold by the first dealership is 164. Therefore, we can write the equation:
C1 + T1 = 164.

Step 2: According to the given information, the second dealership sells twice as many cars as the first dealership and half as many trucks as the first dealership. This can be expressed as:
Cars sold by the second dealership = 2 * Cars sold by the first dealership (2C1)
Trucks sold by the second dealership = 0.5 * Trucks sold by the first dealership (0.5T1)

Step 3: The total number of cars and trucks sold by the second dealership is 229. Therefore, we can write the equation:
Cars sold by the second dealership + Trucks sold by the second dealership = 229.
Substituting the values from Step 2 into this equation, we get:
2C1 + 0.5T1 = 229.

Now we have a system of two equations with two unknowns (C1 and T1). We can solve these equations simultaneously to find the values of C1 and T1.

To solve this problem, we can use a system of equations to represent the number of cars and trucks sold at each dealership.

Let's start by assigning variables to the unknown quantities. Let:
- C1 represents the number of cars sold at the first dealership
- T1 represents the number of trucks sold at the first dealership
- C2 represents the number of cars sold at the second dealership
- T2 represents the number of trucks sold at the second dealership

According to the given information, the first dealership sells a total of 164 cars and trucks. So, we can write the equation:
C1 + T1 = 164 -- Equation 1

The second dealership sells twice as many cars as the first dealership. This can be represented by the equation:
C2 = 2C1 -- Equation 2

The second dealership sells half as many trucks as the first dealership. This can be represented by the equation:
T2 = 0.5T1 -- Equation 3

The second dealership sells a total of 229 cars and trucks. So, we can write the equation:
C2 + T2 = 229 -- Equation 4

Now, we have a system of four linear equations (Equations 1, 2, 3, and 4) that we need to solve simultaneously to find the values of C1, T1, C2, and T2.

To solve this system of equations, we can use various methods such as substitution or elimination. Let's use substitution to solve the system:

From Equation 2, we know that C1 = C2/2.

Substituting this value of C1 into Equation 1:
C2/2 + T1 = 164

Rearranging this equation:
T1 = 164 - C2/2

Substituting this value of T1 into Equation 3:
T2 = 0.5(164 - C2/2)

Substituting the values of T1 and T2 into Equation 4:
C2 + 0.5(164 - C2/2) = 229

Simplifying the equation:
C2 + 82 - 0.5C2 = 229
0.5C2 = 147
C2 = 294

Substituting this value of C2 into Equation 2:
C1 = 294/2
C1 = 147

Substituting the values of C1 and C2 into Equation 1:
147 + T1 = 164
T1 = 164 - 147
T1 = 17

Substituting the values of C1 and C2 into Equation 3:
T2 = 0.5T1
T2 = 0.5(17)
T2 = 8.5 (rounded to the nearest whole number, T2 = 8)

Therefore, the first dealership sold 147 cars and 17 trucks, while the second dealership sold 294 cars and 8 trucks.