To find the angle \( B \) in a triangle using the Law of Cosines, we start with the formula:
\[ b^2 = a^2 + c^2 - 2ac \cdot \cos B \]
Given the values \( a = 9 \), \( b = 40 \), and \( c = 41 \), we can substitute these into the equation:
\[ 40^2 = 9^2 + 41^2 - 2 \cdot 9 \cdot 41 \cdot \cos B \]
Calculating each term:
\[ 40^2 = 1600 \] \[ 9^2 = 81 \] \[ 41^2 = 1681 \]
Now substituting these values into the equation:
\[ 1600 = 81 + 1681 - 2 \cdot 9 \cdot 41 \cdot \cos B \]
Calculate \( 81 + 1681 \):
\[ 81 + 1681 = 1762 \]
Now we rewrite the equation:
\[ 1600 = 1762 - 738 \cdot \cos B \]
Where \( 2 \times 9 \times 41 = 738 \).
Next, isolate \( \cos B \):
\[ 738 \cdot \cos B = 1762 - 1600 \] \[ 738 \cdot \cos B = 162 \] \[ \cos B = \frac{162}{738} \]
Now, calculating \( \frac{162}{738} \):
\[ \cos B = 0.2195 \]
Now we use the inverse cosine to find \( B \):
\[ B = \cos^{-1}(0.2195) \]
Calculating this gives approximately:
\[ B \approx 77.32^\circ \]
Thus, the value of angle \( B \) is:
\[ \boxed{77.32 \text{ degrees}} \]