Do people use UJTs any more? I think is an obsolete technology...Even in its time it looks like a purpose specific device. I had to read up on UJT operation, and I dont know exactly how R2 helps in temperature compensation.
From the formula given here for R2:
http://mysite.du.edu/~etuttle/electron/elect10.htm
it seems that R2 is related to the bias voltage of the E-B1 junction.
You could say that as temperature increases, the thermal voltage of the E-B1 pn junction will increase thus making it harder to thrigger the UJT.
On the other hand, the value of R2 will increase as temperature increases according to its temperature coefficient and the temperature change thus decreasing the standing voltage on the n side of the E-B1 junction hence making it easier to trigger the UJT.
But the value or R1 will also increase by the same percentage therefore the voltage on the n side of the E-B1 n-p junction will be the same as this is like a potential divider.