According to the question,
Let A be the matrix showing the cost per contact (in paisa).
And, B be a matrix showing the number of contacts of each type made in two cities X and Y.
Now, the total amount spent by the party in the two cities will be shown by BA.
Hence, the total amount spent by the party in the two cities is
X: ₹9900
Y: ₹21200
One should consider social activities of a party before casting his/her vote.