The cost of a pencil is thrice the cost of rubber.
The equivalent linear equation in two variables of above statement is:
Let the cost of pencil be p and the cost of rubber be r.
The cost of pencil is equal to the thrice the cost of rubber.
This means
p = 3r