Let the length of the train be $x$ m and its speed be $v$ m/s.
While passing the man, the train covers a distance equal to its own length.
$x = v \times 6 \qquad \text{...(1)}$
While passing the platform, the train covers a distance equal to the sum of its own length and the length of the platform.
$x + 225 = v \times 21 \qquad \text{...(2)}$
Subtracting equation (1) from equation (2) :
$$\begin{aligned}\Rightarrow (x + 225) - x = 21v - 6v\\[1em] \Rightarrow 225 = 15v\\[1em] \Rightarrow v = \frac{225}{15}\\[1em] \Rightarrow v = 15 \text{ m/s }\end{aligned}$$
Speed of the train = 15 m/s
(i) Substituting $v = 15$ m/s in equation (1) :
$x = 15 \times 6 = 90 \text{ m }$
Hence, the length of the train = 90 m.
(ii) Converting the speed into km/h :
$$\begin{aligned}1 \text{ m } = \frac{1}{1000} \text{ km and } 1 \text{ s } = \frac{1}{3600} \text{ h }\\[1em] \Rightarrow 15 \text{ m/s } = \frac{15 \times \frac{1}{1000} \text{ km}}{\frac{1}{3600} \text{ h}}\\[1em] \Rightarrow 15 \text{ m/s } = \frac{15}{1000} \times 3600 \text{ km/h }\\[1em] \Rightarrow 15 \text{ m/s } = 54 \text{ km/h }\end{aligned}$$
Hence, the speed of the train = 54 km h-1.