Let the Number of Dozens of Eggs in First Crate be : D
Given : The Shopkeeper Buys the First Crate Eggs at $1.50 per Dozen
⇒ The Cost of 'D' Dozens of Eggs in First Crate = D × 1.5 = 1.5D
Given : The Second Crate Contains 3 Dozens more than First Crate
⇒ The Number of Dozens of Eggs in Second Crate = D + 3
Given : The Shopkeeper Buys Second Crate at $2 per Dozen
⇒ The Cost of '(D + 3)' Dozens of Eggs in Second Crate = 2 × (D + 3)
⇒ The Total Dollars spend by Shopkeeper on Both Crates :
⇒ 1.5D + 2(D + 3) = 1.5D + 2D + 6 = 3.5D + 6
⇒ The Total Dollars spend by Shopkeeper on Both Crates = 3.5D + 6
Given : He sells all the Dozens at $2.5 per Dozen
⇒ The Money got by him selling all Dozens of Eggs = (D + D + 3) × 2.5
Given : By selling all the Dozens at $2.5 per Dozen, he makes $15 Profit
⇒ By subtracting the Profit from the Money he got, we get the Cost Price
⇒ The Money spent by Shopkeeper : {(2D + 3) × 2.5} - 15
Equating both Values of Money spent by Shopkeeper we get :
⇒ {(2D + 3) × 2.5} - 15 = 3.5D + 6
⇒ {5D + 7.5} - 15 = 3.5D + 6
⇒ 5D - 7.5 = 3.5D + 6
⇒ 1.5D = 13.5
⇒

⇒ Number of Dozens of Eggs in First Crate : D = 9
⇒ Number of Dozens of Eggs in Second Crate : D + 3 = (9 + 3) = 12