Solution:
(i) Let the number of girls be x and the number of boys be y.
Ten students took part in all, and there are 4 more girls than boys, so:
x+y=10
x−y=4
To draw x+y=10, rewrite it as x=10−y and pick a few values:
xy554664
To draw x−y=4, rewrite it as x=4+y:
xy405173
Plotting both lines:

The two lines cross at (7,3).
So 7 girls and 3 boys took part in the quiz.
Check: 7+3=10 ✓ and 7−3=4 ✓
(ii) Let one pencil cost ₹x and one pen cost ₹y.
5x+7y=50
7x+5y=46
For 5x+7y=50:
xy10035
For 7x+5y=46:
xy358−2
Plotting both lines:

The two lines cross at (3,5).
So a pencil costs ₹3 and a pen costs ₹5.
Check: 5(3)+7(5)=15+35=50 ✓ and 7(3)+5(5)=21+25=46 ✓