The first だと is actually two words, だ ("is", the copula) and a conditional-と. That is, ～だと means "if [something] is ～...". See Differences among -たら, なら, -と, -んだったら, -ば, etc and How Conditionals Work in Japanese: …と, …ば, …たら, and …なら.
The first half of the sentence can be broken down like this:
to be interested (more literally, "you have an interest" or "there is an interest")
something you are interested in
(a relative clause with ga-no conversion)
(That) is something you are interested in.
If that is something you are interested in, ...
The second と is part of the ～ようと(する) construction, which means "to try to ～". See Volitional + と + Verb and What is the difference between "verb＋て＋みる" and "verb＋(よ)う+とする"?. (と by itself is a marker for the content of an action, but you have to memorize -ようと as a set phrase first.) Thus the last half of the sentence means:
...you will strive hard trying to understand it.
...you will strive hard in order to understand it.