so... Piotr invested two amounts, say "a" and "b", at 3.5% and 4% respectively
whatever 3.5% of a is, and whatever 4% of b is, it ended up as 1440
now, we know that "b" amount is "
$5000 more than three times" than "a" amount
so three times "a" is 3*a or 3a, now, 5000 more than that is 3a + 5000
now, assuming this is for a year alone,
how much is 3.5% of "a", well, 3/100 * a, or 0.035a
how much is 4% of "b", well, 4/100 * a, or 0.04b
so.. whatever those amounts yielded are, they ended up as 1440
so

do the substitution, and solve for "a", to see how much he invested at 3.5%
how much is "b"? well, b = 3a + 5000