To represent the total cost of visiting the pumpkin farm, you can use the following expression:
\[ \text{Total Cost} = 7 + 1.25p \]
In this expression, \(7\) represents the cost of the hayride, and \(1.25p\) represents the variable cost based on the weight of the pumpkin (where \(p\) is the weight of the pumpkin in pounds).