There's also a different way of writing down the $H$-space structure, that I like for its algebro-geometric flavor. (I'll talk about $\mathbb{C}P^\infty$ here, and $\mathbb{R}P^\infty$ should be analogous.)
Regarding $\mathbb{C}P^\infty$ as a classifying space for complex line bundles, we know that this $H$-space structure is supposed to implement "tensor product of line bundles". In a (not very explicit) sense this tells us the homotopy class of $\mathbb{C}P^\infty \times \mathbb{C}P^\infty \to \mathbb{C}P^\infty$: It represents the line bundle $\mathcal{O}(1,1) = p_1^* \mathcal{O}(1) \otimes p_2^* \mathcal{O}(1)$. We can use this description to write down a much more explicit (and classical) explicit representative.
First, let's recall what the analogous picture looks like for finite projective spaces. The line bundle $\mathcal{O}(1,1)$ determines (upon picking generating sections) the Segre map
$\mathbb{C}P^n \times \mathbb{C}P^m \to \mathbb{C}P^{nm+n+m}$ which takes (in homogeneous coordinates)
$([X_0:\ldots:X_n] , [Y_0:\ldots:Y_m]) \mapsto[X_0 Y_0: \ldots : X_i Y_j: \ldots: X_n Y_m]$
where I'm choosing to be vague on the precise ordering of the coordinates.
(In the end this won't matter up to homotopy, as the maps will become homotopic upon composing with $\mathbb{C}P^{nm+n+m} \hookrightarrow \mathbb{C}P^\infty$.)
The analogous formula with infinitely many homogeneous coordinate makes just as much sense, one just has to a good ordering of pairs of non-negative integers. Such an infinite Segre map gives another realization of the $H$-space structure.