Two vessels carrying a total of 22 Indian nationals were hijacked in separate incidents off Yemen and Somalia, according to officials.