Option A can't be the answer

=> (40, 35) so if p paid 140rs for excess luggage it means he's carrying more than 40kg so q can't carry more than 35kg so he can't be fined (contradictory to given statement)

Option B (30, 35)

=> Both are Carrying excess of 2kg together and they paid 350+140rs together.

If p would have travelled alone then he'd have carried excess 37kg, from before we know 2kg excess weight will cost more than 350, so excess 37kg will always cost more than 2590rs (contradictory to given statement)

Thus, option B is wrong.

By similar arguments Option C (35, 30) is also wrong.

Option D (30, 30)

=> Both are Carrying excess 7 kg together and they paid 350+140rs together.

So per kg they paid 70rs. {(350+140)/7}

If p would have travelled alone then he'd have carried excess 37kg which would have costed him 2590rs. (37*70)

Thus, Option D is correct.