As per given by the question,
John can do the project in 3 hours,
So,
[tex]\frac{1}{3}[/tex]And, Mariano can do same project in 5 hours.
So,
[tex]\frac{1}{5}[/tex]Now,
Let t is the time to finish the project.
So,
If they work together, then;
[tex]\frac{1}{3}+\frac{1}{5}=\frac{1}{t}[/tex]Now,
Multiply both side by 15t,
So,
[tex]\begin{gathered} \frac{15t}{3}+\frac{15t}{5}=\frac{15t}{t} \\ 5t+3t=15 \end{gathered}[/tex]Then,
[tex]\begin{gathered} 5t+3t=15 \\ 8t=15 \\ t=\frac{15}{8} \\ t=1.87 \end{gathered}[/tex]Hence, 1.87 hours would it take them to complete the project if working together.