Hi Salma,
Formula for normally distributed, two-sided confidence intervals is:
CI=x-bar +/- z*SE
Breaking this down:
x-bar=sample mean
z*=z-critical value
SE=standard error
Let's talk about standard error, since it has its own formula:
SE=s/sqrt(n)
s=standard deviation
n=sample size
For this problem:
s=8
n=24
SE=8/sqrt(24)
SE=1.633
Now, looking at z*, the z-critical value. 98% is a somewhat rare confidence level, but I've seen it more on Wyzant than anywhere else, so it may be worth committing this z* to memory or writing on formulas sheet if allowed.
z*0.98=2.326
Now, returning to our original formula:
CI=x-bar +/- z*SE
x-bar=40
z*=2.326
SE=1.633
CI=40 +/- (2.326*1.633)
CI=(36.202, 43.798)
Reducing to one decimal place and putting in requested notation:
36.2 < mu < 43.8
I hope this helps.