There are 150 mangoes in basket p and basket q. 1/4 of the mangoes in basket p were yellow and the rest were green. 3/5 of the mangoes in basket q were yellow and the rest green. The number of green mangoes in both baskets were equal. How many yellow mangoes were there altogether?

To find the total number of yellow mangoes, we need to add the number of yellow mangoes in basket p to the number of yellow mangoes in basket q.

From the given information, we know that 1/4 of the mangoes in basket p were yellow. Let's assume the number of mangoes in basket p is 'x'. Thus, the number of yellow mangoes in basket p is (1/4) * x.

Similarly, we know that 3/5 of the mangoes in basket q were yellow. Let's assume the number of mangoes in basket q is 'y'. Thus, the number of yellow mangoes in basket q is (3/5) * y.

We're also given that the number of green mangoes in both baskets is equal. Let's assume this number is 'g'.

Since the problem states that the total number of mangoes in both baskets is 150, we can write the following equation:
x + y = 150

We also know that the number of green mangoes in both baskets is equal:
g = g

Now, let's solve for the variables. We can do this by using the information given and the equations we've set up.

Since the problem states that the number of green mangoes in both baskets is equal, we can substitute 'g' for both x and y in the equation:
x + y = 150

g + g = 150
2g = 150
g = 150/2
g = 75

Now that we know g = 75, we can substitute it back into the x + y = 150 equation to solve for x and y:
x + y = 150
x + 75 = 150
x = 150 - 75
x = 75

So, the number of mangoes in basket p is 75, and the number of mangoes in basket q is 75.

Now, let's calculate the number of yellow mangoes in each basket using the given fractions:
Number of yellow mangoes in basket p = (1/4) * x = (1/4) * 75 = 75/4 = 18.75
Number of yellow mangoes in basket q = (3/5) * y = (3/5) * 75 = 45

Therefore, the total number of yellow mangoes in both baskets is 18.75 + 45 = 63.75.

However, since we are dealing with whole mangoes, we cannot have a fraction of a mango. Therefore, we can conclude that there are a total of 63 yellow mangoes altogether.