A purchased an article and sold it to B at 25% profit. B marked it up by 20% above the price at which A has purchased it and then sold it after giving a discount of Rs. 300. If B suffered a loss of 10% in the transaction, then find the cost price of the article for A.