$34 \frac{2}{7}$

Let the distance between Newcastle and South Shields be $x$ miles. Then the time for the whole journey is $$\left(\frac{x}{30}+ \frac{x}{40}\right) \; \text{hours} = \frac{7x}{120}\; \text{hours}$$ Thus the average speed is $$\left(2x \div \frac{7x}{120}\right)\; \text{mph} = \frac{240}{7} \; \text{mph} = 34\frac{2}{7} \; \text{mph}$$

*This problem is taken from the UKMT Mathematical Challenges.*