A company owns two dealerships, both of which sell cars and trucks. Dealership A sells a total of 164 cars and trucks. Dealership B sells twice as many cars and half as many trucks as Dealership A, and sells a total of 229 cars and trucks.

Let's assume the number of cars sold by Dealership A is x.

Therefore, the number of trucks sold by Dealership A is 164 - x.
According to the problem, Dealership B sells twice as many cars as Dealership A and half as many trucks as Dealership A.
So, the number of cars sold by Dealership B is 2x.
And the number of trucks sold by Dealership B is (164 - x)/2.
The total number of cars sold by both dealerships is x + 2x = 3x.
The total number of trucks sold by both dealerships is (164 - x) + (164 - x)/2 = 2(164 - x)/2 + (164 - x)/2 = (2(164 - x) + (164 - x))/2 = (328 - 3x)/2.
The total number of cars and trucks sold by both dealerships is 3x + (328 - 3x)/2 = 229.
Multiplying both sides of the equation by 2 gives 6x + 328 - 3x = 458.
Combining like terms gives 3x + 328 = 458.
Subtracting 328 from both sides gives 3x = 130.
Dividing both sides by 3 gives x = 43. Answer: \boxed{43}.

Let's calculate the number of cars and trucks sold by Dealership A and Dealership B step by step.

Step 1: Let's assume the number of cars sold by Dealership A is C and the number of trucks sold by Dealership A is T.
So the total number of cars and trucks sold by Dealership A is C + T.

Step 2: According to the information given, Dealership A sells a total of 164 cars and trucks, so we can write the equation:
C + T = 164

Step 3: Let's calculate the number of cars and trucks sold by Dealership B using the information provided.
Dealership B sells twice as many cars as Dealership A, which means they sold 2C cars.
Dealership B also sells half as many trucks as Dealership A, which means they sold 0.5T trucks.

Step 4: The total number of cars and trucks sold by Dealership B is 229, so we can write the equation:
2C + 0.5T = 229

Step 5: Now we can solve the system of equations formed in Step 2 and Step 4.

Using equation C + T = 164, we can isolate C:
C = 164 - T

Substituting this value of C into the equation 2C + 0.5T = 229:
2(164 - T) + 0.5T = 229
328 - 2T + 0.5T = 229
-1.5T = -99
T = (-99) / (-1.5)
T = 66

Step 6: Now that we know the number of trucks sold by Dealership A (T = 66), we can substitute this value into the equation C + T = 164 to find the number of cars sold by Dealership A:
C + 66 = 164
C = 164 - 66
C = 98

Step 7: Finally, let's calculate the number of cars and trucks sold by Dealership B using the values of C and T we found in Step 6:
Number of cars sold by Dealership B = 2C = 2 * 98 = 196
Number of trucks sold by Dealership B = 0.5T = 0.5 * 66 = 33

So, Dealership A sold 98 cars and 66 trucks, while Dealership B sold 196 cars and 33 trucks.

To find out how many cars and trucks each dealership sold, we need to set up a system of equations.

Let's represent the number of cars sold by Dealership A as "C" and the number of trucks sold as "T".

According to the given information, Dealership A sells a total of 164 cars and trucks. So, the equation becomes:

C + T = 164 ........(Equation 1)

Now, let's represent the number of cars sold by Dealership B as "C1" and the number of trucks sold as "T1".

According to the given information, Dealership B sells twice as many cars and half as many trucks as Dealership A, and sells a total of 229 cars and trucks. So, the equations become:

C1 = 2C ........(Equation 2)

T1 = (1/2)T ........(Equation 3)

C1 + T1 = 229 ........(Equation 4)

Now, let's solve this system of equations to find the values of C and T.

From Equation 2, we can substitute the value of C1 in terms of C into Equation 4:

2C + T1 = 229

Since T1 is (1/2)T from Equation 3, the equation can be rewritten as:

2C + (1/2)T = 229

Multiplying the entire equation by 2 to eliminate the fraction:

4C + T = 458 ........(Equation 5)

Now we have two equations with two variables:

C + T = 164 ........(Equation 1)
4C + T = 458 ........(Equation 5)

We can solve these equations by elimination or substitution method.

Using the substitution method, we isolate T in Equation 1:

T = 164 - C

Substituting this value of T into Equation 5:

4C + (164 - C) = 458

Simplifying the equation:

3C + 164 = 458
3C = 458 - 164
3C = 294
C = 294/3
C = 98

Now, substitute the value of C back into Equation 1 to find T:

98 + T = 164
T = 164 - 98
T = 66

So, Dealership A sold 98 cars and 66 trucks, while Dealership B sold 2 times that number of cars and half that number of trucks, which would be 196 cars and 33 trucks.