(a) Find the value of the real number $k$, for which the polynomial $P(x)=x^3-kx+2$ has the number $2$ as a root. In addition, for the value of $k$ you will find, write this polynomial as the product of two polynomials with integer coefficients.
(b) If the positive real numbers $a,b$ satisfy the equation $$2a+b+\frac{4}{ab}=10,$$ find the maximum possible value of $a$.
### Part (a)
1. **Find the value of \( k \) such that \( P(x) = x^3 - kx + 2 \) has \( x = 2 \) as a root:**
   - Since \( x = 2 \) is a root, we substitute \( x = 2 \) into the polynomial:
     \[
     P(2) = 2^3 - k \cdot 2 + 2 = 0
     \]
   - Simplify the equation:
     \[
     8 - 2k + 2 = 0 \implies 10 - 2k = 0 \implies 2k = 10 \implies k = 5
     \]

2. **Write the polynomial as the product of two polynomials with integer coefficients:**
   - With \( k = 5 \), the polynomial becomes:
     \[
     P(x) = x^3 - 5x + 2
     \]
   - Since \( x = 2 \) is a root, we can factor \( P(x) \) as:
     \[
     P(x) = (x - 2)Q(x)
     \]
   - Perform polynomial division to find \( Q(x) \):
     \[
     \begin{array}{r|rrr}
       x - 2 & 1 & 0 & -5 & 2 \\
       \hline
       & 1 & 2 & -1 & 0 \\
     \end{array}
     \]
     - The quotient \( Q(x) \) is \( x^2 + 2x - 1 \).
   - Therefore, the factorization is:
     \[
     P(x) = (x - 2)(x^2 + 2x - 1)
     \]

### Part (b)
1. **Given the equation \( 2a + b + \frac{4}{ab} = 10 \), find the maximum possible value of \( a \):**
   - Rearrange the equation:
     \[
     b = 10 - 2a - \frac{4}{ab}
     \]
   - Let \( f(a, b) = 2a + b + \frac{4}{ab} \). We need to maximize \( a \) under the constraint \( f(a, b) = 10 \).

2. **Analyze the constraint:**
   - From the equation \( 2a + b + \frac{4}{ab} = 10 \), isolate \( b \):
     \[
     b = 10 - 2a - \frac{4}{ab}
     \]
   - To find the maximum \( a \), consider the inequality:
     \[
     5 - a = \frac{b}{2} + \frac{2}{ab} > 0 \implies a < 5
     \]
   - Square both sides:
     \[
     (5 - a)^2 = \left( \frac{b}{2} + \frac{2}{ab} \right)^2 \geq \frac{4}{a}
     \]
   - Simplify the inequality:
     \[
     a(5 - a)^2 \geq 4
     \]
   - Expand and rearrange:
     \[
     a(a^2 - 10a + 25) \geq 4 \implies a^3 - 10a^2 + 25a - 4 \geq 0
     \]
   - Solve the cubic inequality:
     \[
     (a - 4)(a^2 - 6a + 1) \geq 0
     \]
   - Since \( a < 5 \), the inequality \( (a - 4)(a^2 - 6a + 1) \geq 0 \) implies:
     \[
     a \leq 4
     \]
   - Verify \( a = 4 \):
     \[
     2(4) + b + \frac{4}{4b} = 10 \implies 8 + b + \frac{1}{b} = 10 \implies b + \frac{1}{b} = 2
     \]
   - The equation \( b + \frac{1}{b} = 2 \) has the solution \( b = 1 \).

Conclusion:
\[
\boxed{a \leq 4}
\]