Final answer:
The ratio of the cost of the first bike to the cost of the second bike is 1:3.
Step-by-step explanation:
To find the ratio of the cost of the first bike to the cost of the second bike, we need to consider the profits made on each bike. Let's assume the cost of the first bike is x, and the cost of the second bike is y. For the first bike, the profit is 30% of x, which is 0.3x. Similarly, for the second bike, the profit is 50% of y, which is 0.5y. The total profit is 45% of the total cost, which is 0.45(x+y). We can set up the following equation:
0.3x + 0.5y = 0.45(x+y)
0.3x + 0.5y = 0.45x + 0.45y
0.3x - 0.45x = 0.45y - 0.5y
0.15x = 0.05y
3x = 1y
So, the ratio of the cost of the first bike to the cost of the second bike is 1:3.