The initial temperature of the bar is 25. To get to the t temperature you need to add (t-25) degrees Celsius.
for 1 degree................... 7 Joules
y given degree........ p Joules
p=7y
In our case y=(t-25) .
h(t) = 7(t-25) which is the final answer.