3p + 3q = 36 equation 1
5p + 39 = 40 equation 2
subtracting 39 both sides of equation 1.
5p +39 -39= 40-39
5p =1 ⇒ 5p/5 = 1/5 ⇒ p = 1/5
putting value of p in equation 1.
3(1/5) +3q =36
3/5 +3q =36 equation 3
subtracting 3/5 both sides equation 3 becomes.
3q =36 -3/5
3q=177/5 equation 4
dividing 3 both sides of equation 4
q=59/5