Hydrogen powered cars are electric cars too. The big difference is that you need to produce hydrogen somehow, and that is done via electrolysis, which requires electricity. If that doesn't come from green energy, it's the same issue as with the electricity, which is used to run battery powered electric cars. As of now hydrogen powered electric cars seem to be a dead end and not because it's more profitable to make battery powered electric cars, it's simply because the latter is more efficient.
Hydrogen is just a fuel like gasoline, you can't really make it at home, so you need to buy it from somewhere, the price is not up to you. If you're so fixated on that everything is profit based, you can bet your ass, if hydrogen were to replace gasoline, a lobby (similar to the oil lobby) would dictate the prices.
At the same time you can charge your battery powered electric vehicle at home using your solar panels, which provide you more than enough energy to power your house to the point, where you can sell surplus energy to the provider. Battery technology will evolve, these solid-state batteries are already better than the regular Li-ion ones.